/* ===========================================
   Color Palette (Buzz Lightyear Theme)
   ===========================================
   Purple:       #613B6F (accents, pinned posts)
   Green:        #8DAC50 (success states)
   Green Dark:   #084605 (success text)
   Red:          #DB382D (errors, danger)
   Medium Gray:  #A89EA8 (timestamps, dividers)
   Blue:         #2965CA (primary buttons, links)
   Yellow:       #FFD500 (highlights, warnings)
   =========================================== */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #fafafa;
    color: #222;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px;
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    text-decoration: none;
    color: #222;
    font-weight: 600;
    font-size: 16px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 14px;
}

.nav-user {
    color: #666;
}

.nav-link {
    color: #2965CA;
    text-decoration: none;
}

.nav-link:hover {
    text-decoration: underline;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* Authentication Pages */
.auth-container {
    display: flex;
    justify-content: center;
    padding: 40px 15px;
    min-height: 80vh;
}

.auth-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-footer a {
    color: #2965CA;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.form-control,
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}

.form-control:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2965CA;
    box-shadow: 0 0 0 3px rgba(41, 101, 202, 0.1);
}

.form-check-input {
    margin-right: 8px;
}

.form-radio {
    margin-right: 8px;
}

.field-help {
    font-size: 13px;
    color: #666;
}

.field-error {
    font-size: 13px;
    color: #DB382D;
}

.form-errors {
    padding: 12px;
    background: #fce8e7;
    border: 1px solid #DB382D;
    border-radius: 4px;
    color: #DB382D;
    font-size: 14px;
}

.required {
    color: #DB382D;
}

.optional {
    color: #999;
    font-weight: normal;
    font-size: 12px;
}

/* Radio and Checkbox Styling */
.form-group ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.form-group ul li {
    margin: 6px 0;
}

.form-group input[type="radio"],
.form-group input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.form-group label:has(input[type="radio"]),
.form-group label:has(input[type="checkbox"]) {
    font-weight: normal;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: #2965CA;
    color: white;
}

.btn-primary:hover {
    background: #214fa3;
}

.btn-secondary {
    background: #f5f5f5;
    color: #222;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* Timeline Container */
.timeline-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 15px 100px;
}

.timeline-header {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.timeline-header h1 {
    font-size: 24px;
    margin-bottom: 16px;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    background: white;
    text-decoration: none;
    color: #444;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #999;
    background: #fafafa;
}

.filter-btn.active {
    background: #2965CA;
    color: white;
    border-color: #2965CA;
}

/* Date Dividers */
.date-divider {
    display: flex;
    align-items: center;
    margin: 30px 0 20px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db, transparent);
}

.divider-text {
    padding: 0 20px;
    font-size: 14px;
    color: #A89EA8;
    font-weight: 500;
    white-space: nowrap;
}

/* Timeline Items */
.timeline-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.timeline-image {
    width: 100%;
    display: block;
}

.timeline-content {
    padding: 20px;
}

.timeline-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-icon {
    font-size: 20px;
}

.timeline-text,
.timeline-caption {
    color: #444;
    margin-bottom: 12px;
    line-height: 1.6;
}

.timeline-meta {
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.timeline-meta-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timeline-timestamp {
    display: inline-block;
    font-size: 13px;
    color: #A89EA8;
}

.timeline-author {
    display: inline-block;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Timeline Meta Actions */
.timeline-meta-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Entry Delete Button */
.entry-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    text-decoration: none;
    color: #999;
    background: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.entry-delete-btn:hover {
    color: #DB382D;
    background: #fce8e7;
}

.delete-icon {
    font-size: 16px;
}

/* Entry Unpin Button */
.entry-unpin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    text-decoration: none;
    color: #613B6F;
    background: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.entry-unpin-btn:hover {
    color: #4a2d54;
    background: #ede7f0;
}

.unpin-icon {
    font-size: 14px;
}

/* Entry Pin Button */
.entry-pin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    text-decoration: none;
    color: #999;
    background: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.entry-pin-btn:hover {
    color: #613B6F;
    background: #ede7f0;
}

.pin-icon {
    font-size: 14px;
}

/* Delete Confirmation Page */
.delete-preview {
    padding: 16px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 24px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.preview-icon {
    font-size: 20px;
}

.preview-type {
    font-weight: 600;
    color: #222;
}

.preview-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: #666;
}

/* Danger Button */
.btn-danger {
    background: #DB382D;
    color: white;
}

.btn-danger:hover {
    background: #b02922;
}

/* Entry Sections */
.entry-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.entry-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.entry-section h3 {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entry-section p {
    margin: 6px 0;
    color: #444;
    line-height: 1.6;
}

.entry-section p strong {
    color: #222;
    font-weight: 600;
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: #fafafa;
    border-radius: 4px;
}

.data-item.full-width {
    grid-column: 1 / -1;
}

.data-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.data-value {
    font-size: 14px;
    color: #222;
    font-weight: 500;
}

/* Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    color: #444;
}

.tag.tag-other {
    background: #fafafa;
    font-style: italic;
    border-style: dashed;
}

/* Note Blocks */
.note-block {
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #444;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 14px;
}

.note-block.italic {
    font-style: italic;
}

.note-block.highlight {
    background: #fffbea;
    border-color: #FFD500;
}

/* Data List */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-list p {
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.data-list p:last-child {
    border-bottom: none;
}

.data-list strong {
    color: #666;
    font-weight: 500;
    min-width: 100px;
    display: inline-block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #444;
}

.empty-state p {
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.page-link {
    color: #2965CA;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.2s;
}

.page-link:hover {
    background: #f5f5f5;
}

.page-info {
    color: #A89EA8;
    font-size: 14px;
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.fab {
    background: #2965CA;
    color: white;
    padding: 14px 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    font-weight: 500;
}

.fab:hover {
    background: #214fa3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.fab-icon {
    font-size: 18px;
}

.fab-label {
    font-size: 14px;
}

/* Form Submission Page */
.form-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 0 15px;
}

.form-box {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.form-box h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.form-description {
    color: #666;
    margin-bottom: 24px;
}

.submission-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Messages */
.messages {
    max-width: 700px;
    margin: 15px auto;
    padding: 0 15px;
}

.message {
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    border: 1px solid;
}

.message.success {
    background: #eef4e6;
    border-color: #8DAC50;
    color: #084605;
}

.message.error {
    background: #fce8e7;
    border-color: #DB382D;
    color: #DB382D;
}

.message.info {
    background: #e6eef8;
    border-color: #2965CA;
    color: #2965CA;
}

.message.warning {
    background: #fffbea;
    border-color: #FFD500;
    color: #8a7000;
}

/* Weekend Entry Styles */
.timeline-weekend .weekend-days {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 16px;
}

.timeline-weekend .weekend-day {
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.timeline-weekend .day-label {
    font-size: 14px;
    font-weight: 600;
    color: #2965CA;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-weekend .day-label::before {
    content: "📅";
    font-size: 16px;
}

.timeline-weekend .weekend-day:nth-child(1) .day-label::before {
    content: "🌅";
}

.timeline-weekend .weekend-day:nth-child(2) .day-label::before {
    content: "☀️";
}

.timeline-weekend .weekend-day:nth-child(3) .day-label::before {
    content: "🌤️";
}

.timeline-weekend .weekend-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    margin-bottom: 10px;
}

.timeline-weekend .day-text {
    color: #444;
    line-height: 1.6;
    margin: 0;
}

.timeline-weekend .weekend-notes {
    padding: 16px;
    background: #fffbea;
    border: 1px solid #FFD500;
    border-radius: 8px;
    margin-bottom: 12px;
}

.timeline-weekend .notes-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-weekend .weekend-notes p {
    color: #444;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

/* Words I'm Using Entry Styles - Buzz Lightyear Colors */
.words-display {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

.word-badge {
    font-size: 22px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    display: inline-block;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Buzz Lightyear color rotation */
.word-badge:nth-child(5n+1) { background-color: #613B6F; } /* purple */
.word-badge:nth-child(5n+2) { background-color: #8DAC50; } /* green */
.word-badge:nth-child(5n+3) { background-color: #DB382D; } /* red */
.word-badge:nth-child(5n+4) { background-color: #2965CA; } /* blue */
.word-badge:nth-child(5n+5) { background-color: #FFD500; color: #333; text-shadow: none; } /* yellow - dark text for contrast */

/* Mobile Responsive */
@media (max-width: 600px) {
    .timeline-container {
        padding: 15px 10px 100px;
    }
    
    .timeline-header {
        padding: 16px;
    }
    
    .timeline-content {
        padding: 16px;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
    
    .fab-label {
        display: none;
    }
    
    .fab {
        padding: 14px;
    }
    
    .auth-box {
        padding: 30px 20px;
    }

    .form-box {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .filter-buttons {
        font-size: 13px;
    }

    .filter-btn {
        padding: 6px 10px;
    }
}

/* Pinned Posts Styles */
.timeline-item.pinned {
    border: 2px solid #613B6F;
    background: linear-gradient(135deg, #f5f0f7 0%, white 100%);
    box-shadow: 0 2px 8px rgba(97, 59, 111, 0.15);
}

.pinned-indicator {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #613B6F;
    background: #ede7f0;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* Pin Option in Forms */
.pin-option {
    background: #f5f0f7;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #d4c4db;
}

.pin-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
}

.pin-checkbox-label .form-check-input {
    margin: 0;
}

.pin-icon {
    font-size: 16px;
}

.pin-option .field-help {
    margin-top: 8px;
    margin-left: 24px;
}
