/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    /* Smooth transitions for responsive design */
    transition: padding 0.3s ease;
}

/* Ensure images and media are responsive */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Better text rendering */
body, input, textarea, select, button {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    /* Smooth transitions for responsive changes */
    transition: max-width 0.3s ease, padding 0.3s ease, margin 0.3s ease, border-radius 0.3s ease;
}

/* Responsive container for larger screens */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 480px;
        padding: 0 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 600px;
        padding: 0 20px;
    }
}

@media (min-width: 1025px) {
    .container {
        max-width: 700px;
        padding: 0 24px;
    }
    
    /* Add subtle desktop enhancements - ONLY for old container pages */
    body:not(.main-page) {
        padding: 20px 0;
    }
    
    .container {
        border-radius: 16px;
        margin: 20px auto;
        min-height: calc(100vh - 40px);
        box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    }
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

/* Header Top Section */
.header-top {
    padding: 12px 16px 10px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Navigation Bar (inside header) */
.nav-bar {
    background: white;
    padding: 8px 16px;
}

.nav-items {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.nav-item-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #e1e5e9;
    color: #555;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.nav-item-btn:active {
    transform: translateY(0);
}

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

.nav-text {
    font-weight: 500;
}

#therapy-insights-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

#logout-btn:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

/* Ensure smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

header h1 {
    font-size: 18px;
    margin-bottom: 2px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.date {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
}

/* Main content */
main {
    padding: 16px;
}

/* Quick Add Section */
.quick-add-section {
    margin-bottom: 24px;
}

.quick-add-section h2 {
    font-size: 17px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

/* Quick Add Buttons */
.behavior-buttons, .task-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.quick-behavior-btn, .quick-task-btn {
    padding: 16px 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.quick-behavior-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.quick-task-btn {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.quick-behavior-btn:hover, .quick-behavior-btn:active,
.quick-task-btn:hover, .quick-task-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Emotion Tracker Styles */
.emotion-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

/* Reactions Multi-Select */
.reactions-container {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 12px;
    background: #f8f9fa;
}

.reaction-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.reaction-item:hover {
    background: #e9ecef;
}

.reaction-item:last-child {
    margin-bottom: 0;
}

.reaction-checkbox {
    margin-right: 10px;
    margin-top: 2px;
    transform: scale(1.1);
    cursor: pointer;
}

.reaction-content {
    flex: 1;
    line-height: 1.4;
}

.reaction-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.reaction-description {
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.3;
}

/* Reaction Category Header */
.reaction-category {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.reaction-category-header {
    text-align: center;
}

.reaction-color {
    font-size: 20px;
    margin-right: 8px;
}

.reaction-category-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.reaction-category-description {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 4px;
}

/* Reactions List in Entries */
.reactions-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.reactions-list li {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.3;
}

.quick-emotion-btn {
    padding: 16px 12px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.quick-emotion-btn.positive {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.emotion-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.emotion-definition {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.2;
    font-weight: 400;
}

.quick-emotion-btn:hover, .quick-emotion-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Intensity Slider Styles */
.intensity-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-top: 8px;
    color: #666;
}

#intensity-value {
    font-weight: 600;
    font-size: 16px;
    color: #667eea;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
    min-width: 30px;
    text-align: center;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    margin: 10px 0 5px 0;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Responsive adjustments for quick buttons */
@media (max-width: 414px) {
    .container {
        width: 100%;
    }
    
    main {
        padding: 12px;
    }
    
    header h1 {
        font-size: 16px;
    }
    
    .date {
        font-size: 11px;
    }
    
    .behavior-buttons, .task-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .emotion-buttons {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .quick-behavior-btn, .quick-task-btn {
        padding: 14px 8px;
        font-size: 12px;
        min-height: 65px;
        line-height: 1.1;
    }
    
    .quick-emotion-btn {
        padding: 12px 8px;
        min-height: 65px;
    }
    
    .emotion-name {
        font-size: 13px;
    }
    
    .emotion-definition {
        font-size: 10px;
    }
}

/* Entries Section */
.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 15px;
}

.entries-section h2 {
    font-size: 17px;
    margin-bottom: 0;
    color: #333;
    font-weight: 600;
    flex: 1;
}

.date-filter {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.date-filter label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.date-filter input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.date-filter input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.date-filter input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* Responsive design for date filter */
@media (max-width: 360px) {
    .entries-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .date-filter {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .date-filter label {
        font-size: 11px;
    }
    
    .date-filter input[type="date"] {
        font-size: 12px;
        padding: 5px 8px;
    }
}

.entry {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.entry-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.behavior-entry .entry-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.task-entry .entry-header {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.emotion-entry .entry-header {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.emotion-entry.positive .entry-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.emotion-entry .emotion-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.intensity-bar {
    font-family: monospace;
    color: #9b59b6;
    margin-left: 8px;
    font-size: 14px;
}

.entry-type {
    font-size: 14px;
}

.entry-time {
    font-size: 13px;
    opacity: 0.9;
}

.entry-date {
    font-size: 12px;
    opacity: 0.7;
    margin-right: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 6px;
    backdrop-filter: blur(10px);
}

.edit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.edit-btn:active {
    transform: scale(0.95);
}

.delete-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 6px;
    backdrop-filter: blur(10px);
}

.delete-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.delete-btn:active {
    transform: scale(0.95);
}

.insight-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 6px;
    backdrop-filter: blur(10px);
}

.insight-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.insight-btn:active {
    transform: scale(0.95);
}

/* Modern Saved Insight Modal Styles */
.saved-insight-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border-radius: 16px;
    padding: 24px;
    margin: -20px -20px 24px -20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.saved-insight-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF6B35);
    border-radius: 16px 16px 0 0;
}

.saved-insight-header h3 {
    margin: 0 0 16px 0;
    color: #FFD700;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.insight-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.insight-badge.time {
    background: rgba(129, 140, 248, 0.2);
    border-color: rgba(129, 140, 248, 0.3);
    color: #A5B4FC;
}

.insight-badge.behavior {
    background: rgba(251, 113, 133, 0.2);
    border-color: rgba(251, 113, 133, 0.3);
    color: #FBBF24;
}

.saved-insight-content {
    margin: 0;
    padding: 20px;
    line-height: 1.7;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Improved contrast for insight content on dark background */
.saved-insight-content .insight-highlight {
    background: linear-gradient(120deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    color: #FFD700;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.saved-insight-content .insight-section {
    color: #A5B4FC;
    font-weight: 700;
    font-size: 17px;
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
}

.saved-insight-content .insight-intro {
    background: rgba(129, 140, 248, 0.1);
    border-left: 4px solid #A5B4FC;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.saved-insight-content .insight-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.saved-insight-content .insight-list li {
    color: rgba(255, 255, 255, 0.9);
}

.saved-insight-content .insight-list li:before {
    content: "→";
    color: #FFD700;
    font-weight: bold;
    font-size: 16px;
}

.saved-insight-content p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 16px;
}

.saved-insight-content strong {
    color: rgba(255, 255, 255, 1);
}

.saved-insight-footer {
    margin-top: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    position: relative;
}

.saved-insight-footer::before {
    content: '✨';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-color);
    padding: 0 8px;
    font-size: 16px;
}

.saved-insight-footer small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    display: block;
}

.entry-content {
    padding: 20px;
}

.behavior-name, .task-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.entry-details {
    space-y: 10px;
}

.detail-item {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.detail-item strong {
    color: #555;
}

.therapy-flag {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    display: inline-block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100001; /* Above bottom nav (99999) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 75vh; /* slightly taller */
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
    flex-shrink: 0;
}

/* Ensure modal footer respects safe area on mobile and clears bottom elements */
@media (max-width: 768px) {
    .modal-footer {
        padding-bottom: calc(16px + 80px + env(safe-area-inset-bottom)); /* clear bottom nav height */
    }
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Form Styles */
form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

input[type="text"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background: #fff;
}

input[type="text"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* Custom multi-select emotion field */
.custom-multiselect {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e1e5e9;
}

.emotion-option {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border: 2px solid #e1e5e9;
    background: #fff;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.emotion-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.emotion-option.selected {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.emotion-option.selected:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Insight Popup Styles */
.insight-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1001;
    backdrop-filter: blur(4px);
}

.insight-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 215, 0, 0.1);
    animation: insightSlideIn 0.4s ease-out;
}

@keyframes insightSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.insight-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 24px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.insight-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.insight-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.insight-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.insight-body {
    padding: 30px;
}

.insight-content {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.insight-content p {
    margin-bottom: 20px;
    text-align: left;
    color: rgba(255, 255, 255, 0.95);
}

.insight-content p:last-child {
    margin-bottom: 0;
}

.insight-content strong {
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
}

.insight-content ul {
    margin: 16px 0;
    padding-left: 0;
    list-style: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.insight-content li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.insight-content li:before {
    content: "→";
    color: #FFD700;
    font-weight: bold;
    position: absolute;
    left: 8px;
    font-size: 16px;
}

.insight-content li:last-child {
    margin-bottom: 0;
}

/* Modern styling for insight formatting in original modal */
.insight-content .insight-highlight {
    background: linear-gradient(120deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    color: #FFD700;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.insight-content .insight-section {
    color: #A5B4FC;
    font-weight: 700;
    font-size: 17px;
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
}

.insight-content .insight-intro {
    background: rgba(129, 140, 248, 0.1);
    border-left: 4px solid #A5B4FC;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.insight-content .insight-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.insight-content .insight-list li {
    color: rgba(255, 255, 255, 0.9);
}

.insight-content .insight-list li:before {
    content: "→";
    color: #FFD700;
    font-weight: bold;
    font-size: 16px;
}

.insight-highlight {
    background: linear-gradient(120deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.insight-section {
    color: #764ba2;
    font-weight: 700;
    font-size: 17px;
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
}

.insight-section:first-child {
    margin-top: 0;
}

.insight-intro {
    background: rgba(102, 126, 234, 0.05);
    border-left: 4px solid #667eea;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.insight-list {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.insight-list li:before {
    content: "→";
    color: #667eea;
    font-weight: bold;
    font-size: 16px;
}

.insight-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.insight-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e1e5e9;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.insight-error {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
}

.insight-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.insight-retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 16px;
    transition: background 0.2s ease;
}

.insight-retry-btn:hover {
    background: #5a67d8;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

/* Button Styles */
.form-actions {
    display: flex;
    gap: 10px;
    margin: 0;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn:hover, .btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive adjustments */
@media (max-width: 414px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

/* PWA optimizations for iOS */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    header {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

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

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 14px;
    opacity: 0.7;
}

/* Authentication Styles */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 10px;
}

.auth-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.auth-header p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.auth-form-container {
    padding: 30px 20px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none !important;
}

.auth-btn.loading .btn-text {
    display: none;
}

.auth-btn.loading .btn-loading {
    display: inline !important;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.auth-footer {
    background: #f8f9fa;
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 12px;
}

.form-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: block;
}

/* Authentication Mobile Responsive */
@media (max-width: 414px) {
    .auth-body {
        padding: 10px;
    }
    
    .auth-container {
        border-radius: 16px;
    }
    
    .auth-header {
        padding: 25px 15px;
    }
    
    .auth-logo {
        font-size: 40px;
    }
    
    .auth-header h1 {
        font-size: 20px;
    }
    
    .auth-form-container {
        padding: 25px 15px;
    }
    
    .auth-form h2 {
        font-size: 18px;
    }
}

/* Error Messages */
.auth-error {
    background: #ffe6e6;
    color: #c92a2a;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    border: 1px solid #ffa8a8;
}

.auth-success {
    background: #e6ffe6;
    color: #2b8a3e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    border: 1px solid #8ce99a;
}

/* Action Plan Styles */
.action-plan-section {
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    border: 2px solid #fdcb6e;
}

.action-plan-quick-add {
    margin-bottom: 20px;
}

.quick-task-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.quick-action-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.quick-action-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quick-add-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.quick-add-btn:hover {
    transform: translateY(-2px);
}

.focus-mode-toggle {
    text-align: center;
}

.focus-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #667eea;
    border-radius: 20px;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.focus-btn:hover {
    background: #667eea;
    color: white;
}

.focus-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.action-plan-container {
    margin-top: 20px;
}

.empty-action-state {
    text-align: center;
    padding: 30px 20px;
    color: rgba(0, 0, 0, 0.6);
}

.empty-action-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-action-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-action-subtext {
    font-size: 14px;
    opacity: 0.8;
}

.action-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease;
}

.action-item:hover {
    transform: translateY(-2px);
}

.action-item.completed {
    opacity: 0.7;
    border-left-color: #51cf66;
}

.action-item.focus-mode {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    transform: scale(1.02);
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.action-title {
    font-weight: 600;
    color: #333;
    flex: 1;
    margin-right: 10px;
}

.action-title.completed {
    text-decoration: line-through;
    color: #666;
}

.action-controls {
    display: flex;
    gap: 6px;
}

.action-complete-btn {
    background: #51cf66;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.action-complete-btn:hover {
    background: #40c057;
}

.action-edit-btn {
    background: #3742fa;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-right: 4px;
}

.action-edit-btn:hover {
    background: #2f3542;
}

.action-delete-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.action-delete-btn:hover {
    background: #ff5252;
}

.action-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.action-meta-item {
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.action-meta-item.due-soon {
    background: rgba(255, 107, 107, 0.1);
    color: #e03131;
}

.action-meta-item.overdue {
    background: #ffe0e0;
    color: #c92a2a;
    font-weight: 600;
}

.action-emotion {
    display: flex;
    gap: 4px;
    font-size: 11px;
    margin-top: 8px;
}

.emotion-tag {
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 8px;
    color: #667eea;
}

/* Action Plan Modal Styles */
.action-plan-modal-content {
    max-width: 500px;
}

.completion-celebration {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    color: white;
}

.celebration-message {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

/* Focus Mode Styles */
body.focus-mode .action-item:not(.focus-mode) {
    display: none;
}

body.focus-mode .action-plan-container {
    max-height: 200px;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .quick-task-input-container {
        flex-direction: column;
    }
    
    .quick-add-btn {
        width: 100%;
    }
    
    .action-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-controls {
        margin-top: 8px;
        justify-content: flex-end;
    }
}

/* Enhanced layouts for tablets and larger screens */
@media (min-width: 481px) {
    /* Better button grid layouts */
    .quick-buttons {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 14px;
    }
    
    .emotion-buttons {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 14px;
    }
    
    /* Enhanced modal sizes */
    .modal-content {
        width: 85%;
        max-width: 500px;
        max-height: 75vh;
        margin: 3% auto;
    }
}

@media (min-width: 769px) {
    /* Wider button grids for larger screens */
    .quick-buttons {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .emotion-buttons {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
    }
    
    /* Better spacing for main content */
    main {
        padding: 20px;
    }
    
    /* Enhanced sections */
    .section {
        margin-bottom: 32px;
    }
    
    .section h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    /* Enhanced entry display */
    .entry {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    /* Better modal experience */
    .modal-content {
        max-width: 600px;
        max-height: 80vh;
        margin: 2% auto;
    }
    
    .modal-header h3 {
        font-size: 20px;
    }
}

@media (min-width: 1025px) {
    /* Desktop optimizations */
    .quick-buttons {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 18px;
    }
    
    .emotion-buttons {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 18px;
    }
    
    /* Enhanced focus mode for larger screens */
    .focus-mode .action-item:not(.focus-mode) {
        opacity: 0.4;
        transform: scale(0.95);
    }
    
    .focus-mode .action-item.focus-mode {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
    }
    
    /* Better typography for large screens */
    body {
        font-size: 16px;
        line-height: 1.7;
    }
    
    /* Enhanced action plan section */
    .action-plan-container {
        padding: 20px;
    }
    
    .action-item {
        padding: 18px;
        margin-bottom: 16px;
    }
    
    /* Enhanced hover states for desktop */
    .quick-behavior-btn:hover,
    .quick-task-btn:hover,
    .quick-emotion-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    }
    
    /* Better form layouts */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    /* Enhanced input fields */
    input[type="text"],
    input[type="date"],
    input[type="range"],
    select,
    textarea {
        font-size: 15px;
        padding: 12px;
    }
    
    /* Better entry header layout */
    .entry-header {
        padding: 16px 20px;
    }
    
    .entry-type {
        font-size: 15px;
    }
    
    /* Enhanced buttons */
    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* Modern Therapy Page Styles - NOW USING MAIN CLASSES */
/* Therapy pages now use .main-page, .main-container, .main-header, .main-content */

.back-btn, .logout-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover, .logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.header-title {
    text-align: center;
    flex: 1;
}

.header-title h1 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 4px 0 0 0;
    font-size: 14px;
    font-weight: 400;
}

/* Therapy-specific content styling */
.main-content .stats-card,
.main-content .entries-section {
    /* Therapy page specific styles preserved */
    flex-direction: column;
    gap: 20px;
}

/* Modern Cards */
.stats-card, .filter-card, .actions-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Stats Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px 8px;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Card */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.filter-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.time-filters, .type-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-chip, .type-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover, .type-chip:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.filter-chip.active, .type-chip.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.custom-date-toggle {
    background: transparent;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.custom-date-toggle:hover {
    border-color: #667eea;
    color: #667eea;
}

.custom-date-section {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.date-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.date-input {
    flex: 1;
}

.date-input label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.date-input input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.date-actions {
    display: flex;
    gap: 8px;
}

.apply-btn, .clear-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-btn {
    background: #667eea;
    color: white;
    border: none;
}

.clear-btn {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Actions Card */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.sort-select {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-left: auto;
}

/* Entries Section */
.entries-section {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.entries-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.entries-section .time-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.entries-section .type-filters {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.entries-section .custom-date-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.entries-section .action-buttons {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.entries-container {
    padding: 20px;
}

/* Modern Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    color: #374151;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.empty-state p {
    margin: 0 0 24px 0;
    font-size: 14px;
}

.add-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Modern Therapy Entry Cards */
.therapy-entry {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.therapy-entry:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #667eea;
}

.therapy-entry .entry-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.therapy-entry .entry-type {
    font-weight: 600;
    font-size: 14px;
}

.therapy-entry .entry-date,
.therapy-entry .entry-time {
    font-size: 12px;
    opacity: 0.9;
}

.therapy-entry .therapy-flag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.therapy-entry .entry-content {
    padding: 16px;
}

.therapy-entry .primary-info {
    font-size: 15px;
    margin-bottom: 12px;
    color: #1e293b;
    font-weight: 600;
}

.therapy-entry .detail-info {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.5;
}

.therapy-entry .detail-info:last-child {
    margin-bottom: 0;
}

.therapy-entry .detail-info strong {
    color: #374151;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    padding: 32px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Modern Main Page Styles */
.main-page {
    background: #f8fafc;
    min-height: 100vh;
    /* Ensure full width usage on desktop */
    padding: 0;
    margin: 0;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f8fafc;
    /* Ensure proper width on all screen sizes */
    width: 100%;
    padding: 0;
}

/* Modern Header */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-brand h1 {
    color: white;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-date {
    color: rgba(255, 255, 255, 0.8);
    margin: 4px 0 0 0;
    font-size: 14px;
    font-weight: 400;
}

.header-nav {
    display: flex;
    gap: 12px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.nav-btn:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.15s ease;
}

.nav-btn.primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-btn.primary:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 3px 10px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.nav-btn.secondary {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.28);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 3px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Main Content */
.main-content {
    padding: 20px;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.action-card.full-width {
    grid-column: 1 / -1;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.card-header .card-icon {
    font-size: 24px;
    margin-right: 12px;
}

.card-title {
    flex: 1;
}

.card-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.card-title p {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #64748b;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pattern Buttons */
.pattern-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.pattern-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    position: relative;
}

.pattern-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

.pattern-btn .btn-icon {
    font-size: 18px;
}

.pattern-btn .btn-text {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

/* Kids Behavior Buttons */
.kids-behavior-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.kids-behavior-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 70px;
    position: relative;
}

.kids-behavior-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

.kids-behavior-btn .btn-icon {
    font-size: 18px;
}

.kids-behavior-btn .btn-text {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
    text-align: center;
}

/* Kids Behavior Entry Styling - matches behavior entries */
.kids-behavior-entry .entry-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.kids-behavior-entry .child-info {
    font-size: 14px;
    color: #dc2626;
    font-weight: 600;
    margin-bottom: 8px;
    padding: 6px 12px;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 6px;
}

/* Kids Behavior Card - Uses default action-card styling */

/* Hide emotion tags on homepage action plan, show only in modal */
.action-plan-list .action-emotion {
    display: none;
}

/* Loading state for action plan */
.loading-action-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.loading-icon {
    font-size: 32px;
    margin-bottom: 12px;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 14px;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tooltips for kids behavior buttons */
.kids-behavior-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 200px;
    white-space: normal;
    text-align: center;
}

.kids-behavior-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1e293b;
    z-index: 1000;
}

/* Check-in Buttons */
.checkin-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.checkin-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.checkin-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.checkin-btn .btn-icon {
    font-size: 18px;
}

.checkin-btn .btn-text {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
}

/* Emotion Buttons */
.emotion-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.emotion-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.emotion-btn.negative:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2);
}

.emotion-btn.positive:hover {
    background: #f0fdf4;
    border-color: #86efac;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.emotion-btn.other:hover {
    background: #fefbf0;
    border-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.emotion-main {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.emotion-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

/* Action Plan Styles */
.quick-add-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.quick-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.quick-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-task-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.add-task-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.focus-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.focus-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.action-plan-list {
    min-height: 140px;
}

.empty-action-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-text {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.empty-subtext {
    font-size: 14px;
}

/* Entries Card */
.date-filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.entries-list {
    min-height: 200px;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-text {
    font-size: 14px;
}

/* Section Headers (Acting as Card Headers) */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 8px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.section-header:first-child {
    margin-top: 0;
}

.section-icon {
    font-size: 24px;
    margin-right: 12px;
}

.section-title {
    flex: 1;
}

.section-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.section-title p {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #64748b;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-bottom-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 24px 0 8px 0;
}

/* Tooltips */
.pattern-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 4px;
}

/* Desktop optimization for main page */
@media (min-width: 1025px) {
    .main-page {
        /* Full width on desktop, no constraining margins */
        background: #f8fafc;
        padding: 0;
    }
    
    .main-container {
        /* Use more screen real estate on larger screens */
        max-width: 1400px;
        padding: 0 20px;
    }
    
    .main-content {
        padding: 24px;
    }
    
    .quick-actions-grid {
        /* Better grid layout for desktop */
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 24px;
    }
}

/* Responsive Design - Main Page */
@media (max-width: 768px) {
    .main-header {
        padding: 16px;
    }
    
    .main-header .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .header-brand h1 {
        font-size: 24px;
    }
    
    .header-nav {
        gap: 8px;
    }
    
    .nav-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .action-card {
        padding: 16px;
    }
    
    .pattern-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .pattern-btn {
        padding: 10px 6px;
    }
    
    .pattern-btn .btn-text {
        font-size: 11px;
    }
    
    .checkin-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    
    .checkin-btn {
        padding: 10px 6px;
    }
    
    .checkin-btn .btn-text {
        font-size: 11px;
    }
    
    .emotion-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .emotion-btn {
        padding: 10px;
    }
    
    .emotion-main {
        font-size: 13px;
    }
    
    .emotion-desc {
        font-size: 11px;
    }
    
    .quick-add-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .add-task-btn {
        padding: 12px;
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        text-align: center;
    }
    
    .card-actions {
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }
    
    .section-icon {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .section-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 12px;
    }
    
    .header-brand h1 {
        font-size: 20px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 4px;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .action-card {
        padding: 12px;
        border-radius: 12px;
    }
    
    .card-title h3 {
        font-size: 16px;
    }
    
    .pattern-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kids-behavior-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .checkin-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pattern-btn .btn-icon,
    .checkin-btn .btn-icon,
    .kids-behavior-btn .btn-icon {
        font-size: 16px;
    }
    
    .pattern-btn .btn-text,
    .checkin-btn .btn-text,
    .kids-behavior-btn .btn-text {
        font-size: 10px;
    }
}

/* Responsive Design - Mobile adjustments for therapy content */
@media (max-width: 640px) {
    .main-header {
        padding: 16px;
    }
    
    .header-title h1 {
        font-size: 20px;
    }
    
    .main-content:has(.stats-card) {
        padding: 16px;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .time-filters, .type-filters {
        gap: 6px;
    }
    
    .filter-chip, .type-chip {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .date-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filters-row .time-filters {
        justify-content: center;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .action-buttons {
        justify-content: center;
        flex-direction: column;
    }
    
    .sort-select {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* ================================
   INNERGUIDE CHAT INTERFACE STYLES
   ================================ */

/* InnerGuide Page Layout - NOW USING MAIN CLASSES */
/* InnerGuide pages now use .main-page, .main-container, .main-header, .main-content */

/* InnerGuide specific: White background for chat container */
.main-container:has(.chat-container) {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.header-status {
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-indicator.online .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Chat Main Area - now using .main-content */
.main-content:has(.chat-container) {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0; /* Override default main-content padding for chat */
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    min-height: 0;
}

.chat-messages {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Message Groups */
.message-group {
    display: flex;
    gap: 12px;
    max-width: 100%;
}

.message-group.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.avatar-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
}

.avatar-icon.user-avatar {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.message-content {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 60px);
}

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

.message-sender {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.message-time {
    font-size: 12px;
    color: #9ca3af;
}

.user-message .message-header {
    justify-content: flex-end;
}

/* Message Bubbles */
.message-bubble {
    background: #f3f4f6;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
}

.bot-message .message-bubble {
    background: #f3f4f6;
    color: #374151;
}

.message-bubble p {
    margin: 0;
}

.message-bubble p + p {
    margin-top: 12px;
}

.message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-bubble ol li {
    margin: 6px 0;
    line-height: 1.4;
}

.message-bubble strong {
    font-weight: 600;
    color: inherit;
}

.user-message .message-bubble strong {
    font-weight: 700;
}

.message-bubble br {
    line-height: 1.6;
}

/* Typing Indicator */
.typing-indicator {
    padding: 0 20px;
}

.message-bubble.typing {
    background: #e5e7eb;
    padding: 16px;
    width: fit-content;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Quick Suggestions */
.quick-suggestions {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.suggestions-header {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 12px;
}

.suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-chip {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.suggestion-chip:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.suggestion-chip:active {
    transform: translateY(0);
}

/* Chat Input Container */
.chat-input-container {
    border-top: 1px solid #e5e7eb;
    background: white;
    padding: 16px 20px;
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 8px;
    transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    outline: none;
    font-family: inherit;
    max-height: 120px;
    min-height: 40px;
}

.chat-input::placeholder {
    color: #9ca3af;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.send-btn:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.send-btn:not(:disabled):active {
    transform: scale(0.95);
}

/* Input Footer */
.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
}

.character-count {
    font-weight: 500;
}

.input-hints .hint {
    font-style: italic;
}

/* System Modal Styles */
.system-modal-content {
    max-width: 400px;
}

/* Responsive Design for InnerGuide */
@media (max-width: 768px) {
    .main-container:has(.chat-container) {
        max-width: 100%;
        border-radius: 0;
    }
    
    .chat-messages {
        padding: 0 16px;
    }
    
    .chat-input-container, .quick-suggestions {
        padding: 16px;
    }
    
    .suggestion-chip {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .message-content {
        max-width: calc(100% - 50px);
    }
    
    .avatar-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (min-width: 1025px) {
    .main-container:has(.chat-container) {
        margin: 20px auto;
        border-radius: 16px;
        min-height: calc(100vh - 40px);
        box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    }
    
    .main-header:has(.header-status) {
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }
}

/* Smooth scrolling */
.chat-container {
    scroll-behavior: smooth;
}

/* ================================
   LANDING PAGE STYLES
   ================================ */

/* Mobile-first global reset to prevent overflow */
html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Ensure all elements use border-box sizing to prevent overflow */
.landing-page *,
.landing-page *::before,
.landing-page *::after {
    box-sizing: border-box;
    max-width: 100%;
}

/* Prevent any element from causing horizontal overflow */
.landing-page {
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
}

.landing-page > * {
    max-width: 100%;
}

/* Mobile browser specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific fixes */
    .landing-page {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .landing-page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .landing-container {
        width: 100%;
        max-width: 100%;
    }
}

/* Real mobile device fixes */
@media only screen and (max-device-width: 812px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .landing-page {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .landing-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .nav-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 12px !important;
    }
    
    .hero-section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 40px 12px 60px !important;
    }
}

/* Mobile Chrome specific fixes - targets exact rendering differences */
@media only screen and (max-width: 768px) {
    /* Emergency overflow prevention for all elements */
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Prevent specific common overflow culprits but exempt nav-brand */
    img:not(.nav-logo), svg, button, input, select, textarea, section, header, main, footer {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Specific exceptions for navigation elements */
    .nav-brand {
        width: auto !important;
        max-width: none !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .nav-logo {
        width: auto !important;
        max-width: none !important;
        flex-shrink: 0 !important;
    }
    
    .nav-title {
        width: auto !important;
        max-width: none !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Force flexbox to wrap for content sections */
    .nav-content {
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .hero-content, .feature-grid, .cta-section {
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Specific button fixes */
    .nav-btn, .cta-btn, .modal-submit-btn {
        min-width: auto !important;
        width: auto !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        padding: 12px 16px !important;
    }
    
    /* Text overflow prevention */
    h1, h2, h3, h4, h5, h6, p, span, div {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }
    
    /* Prevent absolute/fixed positioned elements from overflowing */
    [style*="position: absolute"], [style*="position: fixed"] {
        right: 0 !important;
        max-width: 100% !important;
    }
}

.landing-page {
    background: #f8fafc;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    box-sizing: border-box;
}

.landing-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
    box-sizing: border-box;
    position: relative;
}

/* Force contain all content within viewport */
.landing-container * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Navigation */
.landing-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.nav-content {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.nav-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-title:hover {
    opacity: 0.8;
}

.nav-actions {
    display: flex;
    gap: 12px;
}

/* Mobile responsive nav buttons */
@media (max-width: 768px) {
    .header-nav {
        gap: 8px;
    }
    
    .nav-btn {
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 14px;
        gap: 8px;
    }
    
    .nav-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 640px) {
    .header-nav {
        gap: 6px;
    }
    
    .nav-btn {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 12px;
        gap: 6px;
    }
    
    .nav-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Hide text on very small screens, show only icons */
    .nav-btn span {
        display: none;
    }
}

/* Landing page specific nav button styles */
.landing-nav .nav-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #374151;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.landing-nav .nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.06);
}

.landing-nav .nav-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid transparent;
    color: white;
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.landing-nav .nav-btn.primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 6px 16px rgba(102, 126, 234, 0.35),
        0 2px 8px rgba(102, 126, 234, 0.2);
}

.landing-nav .nav-btn.secondary {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-weight: 600;
}

.landing-nav .nav-btn.secondary:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
    color: #5a6fd8;
    transform: translateY(-2px);
}

/* Login Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
    transform: scale(1.1);
}

.modal-body {
    padding: 24px 32px 32px;
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form .form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.modal-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.modal-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 4px 12px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 1);
}

.modal-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.modal-submit-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.4),
        0 3px 10px rgba(102, 126, 234, 0.2);
}

.modal-submit-btn:active {
    transform: translateY(0);
}

.modal-footer {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.modal-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.modal-footer a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Mobile responsive modal */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        margin: 20px;
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 20px 24px 12px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px 24px 24px;
    }
    
    .modal-form .form-group input {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Removed conflicting nav-btn styles - using header nav styles instead */

/* Hero Section */
.hero-section {
    padding: 80px 24px 120px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 24px 0;
    color: #1f2937;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 40px 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.cta-btn.large {
    padding: 18px 28px;
    font-size: 18px;
}

.cta-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.cta-btn.secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.cta-btn.secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 400px;
    width: 100%;
}

.hero-card .card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-card .card-icon {
    font-size: 32px;
}

.hero-card .card-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.pattern-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pattern-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.pattern-emoji {
    font-size: 20px;
}

.pattern-name {
    font-weight: 600;
    color: #374151;
}

/* Section Styling for Landing Page */
.section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-content .section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.section-subtitle {
    font-size: 20px;
    color: #6b7280;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    padding: 120px 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.feature-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.feature-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.feature-description {
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

/* How It Works Section */
.how-it-works-section {
    padding: 120px 0;
    background: #f8fafc;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.step-description {
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

/* Auth Section */
.auth-section {
    padding: 120px 0;
    background: white;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.auth-tab {
    flex: 1;
    padding: 20px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: white;
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

.auth-form-container {
    padding: 40px;
}

.auth-form-container.hidden {
    display: none;
}

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

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

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

.form-group input {
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    color: #6b7280;
    margin: 0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* ================================
   SHARED FOOTER COMPONENT STYLES
   ================================ */

.shared-footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Brand Section */
.footer-brand-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.footer-brand-name {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: #d1d5db;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    max-width: 300px;
}

/* Links Section */
.footer-links-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-section-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0 0 16px 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: #d1d5db;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.footer-link:hover {
    color: #667eea;
    transform: translateX(4px);
}

/* Social Section */
.footer-social-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-social-links {
    display: flex;
    gap: 16px;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.footer-social-link:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    transform: translateY(-2px);
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
}

/* Copyright Section */
.footer-copyright-section {
    grid-column: 1 / -1;
    margin-top: 40px;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    margin-bottom: 20px;
}

.footer-copyright {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-brand-section {
        align-items: center;
    }
    
    .footer-tagline {
        max-width: none;
    }
    
    .footer-links-section,
    .footer-social-section {
        align-items: center;
    }
    
    .footer-social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .shared-footer {
        padding: 40px 0 20px;
    }
    
    .footer-container {
        padding: 0 16px;
        gap: 24px;
    }
    
    .footer-brand-name {
        font-size: 20px;
    }
    
    .footer-social-links {
        gap: 12px;
    }
    
    .footer-social-link {
        width: 40px;
        height: 40px;
    }
}

/* Page-specific footer adjustments */
.app-page-footer {
    margin-top: 40px;
}

.therapy-page-footer {
    margin-top: 40px;
}

/* Ensure footer appears at bottom of pages */
.main-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* ================================
   LEGAL PAGES STYLES
   ================================ */

.legal-page .main-content {
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.legal-document {
    padding: 40px;
    line-height: 1.7;
    color: #374151;
}

.legal-meta {
    background: #f8fafc;
    padding: 20px;
    margin: -40px -40px 40px -40px;
    border-bottom: 1px solid #e5e7eb;
}

.legal-meta p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.legal-meta p:first-child {
    margin-bottom: 8px;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
}

.legal-section h3 {
    color: #374151;
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px 0;
}

.legal-section p {
    margin-bottom: 16px;
    text-align: justify;
}

.legal-section ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-section li {
    margin-bottom: 8px;
    color: #4b5563;
}

.legal-section a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.legal-section a:hover {
    text-decoration: underline;
    color: #5a67d8;
}

.legal-section strong {
    color: #111827;
    font-weight: 600;
}

.legal-footer {
    background: #f8fafc;
    padding: 24px;
    margin: 40px -40px -40px -40px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.legal-footer p {
    margin: 0;
    color: #6b7280;
    font-style: italic;
    font-size: 14px;
}

/* Legal page responsive design */
@media (max-width: 768px) {
    .legal-page .main-content {
        padding: 16px;
    }
    
    .legal-document {
        padding: 24px;
    }
    
    .legal-meta {
        margin: -24px -24px 24px -24px;
        padding: 16px;
    }
    
    .legal-section h2 {
        font-size: 20px;
    }
    
    .legal-section h3 {
        font-size: 16px;
    }
    
    .legal-section p {
        text-align: left;
    }
    
    .legal-footer {
        margin: 24px -24px -24px -24px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .legal-document {
        padding: 20px;
    }
    
    .legal-meta {
        margin: -20px -20px 20px -20px;
        padding: 16px;
    }
    
    .legal-section ul {
        padding-left: 20px;
    }
    
    .legal-footer {
        margin: 20px -20px -20px -20px;
        padding: 16px;
    }
}

/* Dark mode support for legal pages */
@media (prefers-color-scheme: dark) {
    .legal-content {
        background: #1f2937;
        color: #f3f4f6;
    }
    
    .legal-document {
        color: #e5e7eb;
    }
    
    .legal-meta {
        background: #111827;
        border-color: #374151;
    }
    
    .legal-meta p {
        color: #9ca3af;
    }
    
    .legal-section h2 {
        color: #f9fafb;
    }
    
    .legal-section h3 {
        color: #e5e7eb;
    }
    
    .legal-section li {
        color: #d1d5db;
    }
    
    .legal-section strong {
        color: #f9fafb;
    }
    
    .legal-footer {
        background: #111827;
        border-color: #374151;
    }
    
    .legal-footer p {
        color: #9ca3af;
    }
}

/* ================================
   ENHANCED LANDING PAGE SECTIONS
   ================================ */

/* Demo Section */
.demo-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.demo-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.demo-item {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.demo-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 24px;
}

/* App Preview */
.mock-app {
    max-width: 300px;
    margin: 0 auto;
    background: #1a202c;
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.mock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.mock-content {
    background: white;
    border-radius: 16px;
    padding: 20px;
    min-height: 200px;
}

.mock-entry {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.entry-type {
    font-weight: 600;
    color: #dc2626;
}

.entry-time {
    font-size: 12px;
    color: #64748b;
}

.entry-content {
    color: #374151;
    margin-bottom: 16px;
    line-height: 1.5;
}

.insight-btn-demo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Interactive Pattern Demo */
.demo-scenario {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid #667eea;
}

.pattern-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.pattern-option {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pattern-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.pattern-option.correct {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.pattern-option.incorrect {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.demo-result {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px;
}

/* AI Insight Demo */
.insight-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    border-radius: 16px;
    padding: 24px;
}

.insight-pattern {
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: inline-block;
}

.insight-content h4 {
    color: #f59e0b;
    margin: 16px 0 8px 0;
    font-size: 16px;
}

.insight-content p {
    color: #e5e7eb;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Before/After Examples */
.transformation-cards {
    display: grid;
    gap: 24px;
}

.transformation-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    background: white;
}

.before-after-header {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

.before-after-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.before, .after {
    padding: 20px;
    border-radius: 12px;
}

.before {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.after {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.before h4, .after h4 {
    margin-bottom: 12px;
    font-size: 16px;
}

.before ul, .after ul {
    margin: 0;
    padding-left: 20px;
}

.before li, .after li {
    margin-bottom: 8px;
    font-size: 14px;
}

.arrow {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

/* Education Section */
.education-section {
    padding: 80px 0;
    background: white;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.education-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid #e2e8f0;
}

.education-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.education-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 24px;
}

/* Psychology Content */
.psychology-point {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.psychology-point h4 {
    color: #1a202c;
    margin-bottom: 8px;
    font-size: 16px;
}

.psychology-source {
    margin-top: 20px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #4c51bf;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}

/* Checklist */
.checklist-intro {
    margin-bottom: 24px;
    color: #4b5563;
    font-style: italic;
}

/* Pricing Section */
.pricing-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Pricing Toggle */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 60px 0 80px;
}

.toggle-label {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.save-text {
    color: #10b981;
    font-weight: 700;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 40px;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    border-radius: 20px;
    transition: 0.3s;
    border: 2px solid #d1d5db;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 32px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-slider {
    background-color: #10b981;
    border-color: #059669;
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(40px);
}

.toggle-badge {
    position: absolute;
    top: -25px;
    right: -10px;
    background: #10b981;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.toggle-input:checked + .toggle-slider .toggle-badge {
    opacity: 1;
}

/* Pricing Cards */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 40px 32px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.pricing-card.featured .plan-badge {
    background: #fbbf24;
    color: #1a202c;
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.plan-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a202c;
}

.pricing-card.featured .plan-name {
    color: white;
}

.plan-price {
    margin-bottom: 8px;
}

.price-amount {
    font-size: 48px;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
}

.pricing-card.featured .price-amount {
    color: white;
}

.price-period {
    font-size: 18px;
    color: #6b7280;
    margin-left: 4px;
}

.pricing-card.featured .price-period {
    color: rgba(255, 255, 255, 0.8);
}

.annual-savings {
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.pricing-card.featured .annual-savings {
    color: #fbbf24;
}

.card-features {
    margin-bottom: 40px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 12px 0;
    font-size: 16px;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.pricing-card.featured .features-list li {
    color: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.features-list li:last-child {
    border-bottom: none;
}

.card-cta {
    text-align: center;
}

.pricing-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
}

/* Trust Section */
.trust-section {
    margin: 80px 0;
    text-align: center;
}

.trust-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 48px;
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.trust-item {
    text-align: center;
    padding: 24px;
}

.trust-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.trust-text {
    font-size: 16px;
    color: #4b5563;
    font-weight: 500;
}

/* Pricing FAQ */
.pricing-faq {
    margin: 80px 0;
}

.faq-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    margin-bottom: 48px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-item-simple {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.faq-item-simple h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
}

.faq-item-simple p {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* Final CTA Banner */
.pricing-cta-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    margin-top: 80px;
}

.cta-content h3 {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.cta-content .cta-btn {
    background: white;
    color: #667eea;
    border: none;
    font-weight: 700;
    padding: 16px 40px;
    font-size: 18px;
    display: inline-block;
    margin: 0 auto;
}

.cta-content .cta-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

/* Dedicated Checklist Section */
.checklist-section {
    padding: 80px 0;
    background: #f8fafc;
}

/* Override the individual checklist sections */
.checklist-section .checklist-section {
    margin-bottom: 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.checklist-container {
    max-width: 1000px;
    margin: 60px auto 0;
}

.checklist-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.checklist-icon {
    font-size: 48px;
    margin-bottom: 24px;
    text-align: center;
}

/* Force grid layout for checklist items */
.checklist-section .checklist-items,
.checklist-card .checklist-items,
.checklist-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
}

.checklist-section h4 {
    margin-bottom: 16px;
    color: #1a202c;
    font-size: 16px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.checklist-item:hover {
    background: #f8fafc;
}

.health-check {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.checklist-result {
    margin-top: 24px;
    padding: 20px;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    text-align: center;
    grid-column: 1 / -1; /* Span full width across all columns */
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: #f8fafc;
}

.faq-container {
    max-width: 800px;
    margin: 60px auto 0;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 24px;
    color: #4b5563;
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Onboarding Preview */
.onboarding-preview-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.onboarding-preview-section .section-title,
.onboarding-preview-section .section-subtitle {
    color: white;
}

.onboarding-timeline {
    max-width: 800px;
    margin: 60px auto;
}

.timeline-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.timeline-day {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.timeline-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.timeline-content h3 {
    margin-bottom: 16px;
    font-size: 20px;
    color: white;
}

.timeline-content ul {
    margin: 16px 0;
    padding-left: 20px;
}

.timeline-content li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.timeline-tip {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.onboarding-cta {
    text-align: center;
    margin-top: 60px;
}

.cta-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-arrow {
    transition: transform 0.3s ease;
}

.cta-primary:hover .cta-arrow {
    transform: translateX(4px);
}

.cta-subtext {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Responsive Design for New Sections */
@media (max-width: 768px) {
    .demo-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .demo-item {
        padding: 24px;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 40px;
    }
    
    .education-card {
        padding: 24px;
    }
    
    .checklist-section .checklist-items,
    .checklist-card .checklist-items,
    .checklist-items {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .checklist-section .checklist-section {
        padding: 16px;
    }
    
    .checklist-card {
        padding: 24px;
    }
    
    /* Pricing responsive - mobile */
    .pricing-section {
        padding: 80px 0;
    }
    
    .pricing-toggle {
        gap: 16px;
        margin: 40px 0 60px;
    }
    
    .toggle-label {
        font-size: 16px;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pricing-card {
        padding: 32px 24px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-8px);
    }
    
    .price-amount {
        font-size: 40px;
    }
    
    .trust-title {
        font-size: 28px;
    }
    
    .trust-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .faq-title {
        font-size: 28px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .pricing-cta-banner {
        padding: 40px 24px;
    }
    
    .cta-content h3 {
        font-size: 28px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .before-after-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .arrow {
        display: none;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .education-card {
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 16px;
    }
    
    .timeline-day {
        align-self: flex-start;
    }
    
    .pattern-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .demo-section,
    .education-section,
    .faq-section,
    .onboarding-preview-section {
        padding: 60px 0;
    }
    
    .faq-question {
        padding: 20px;
    }
    
    .faq-answer {
        padding: 0 20px 20px;
    }
    
    .timeline-content {
        padding: 20px;
    }
}

/* Legacy footer compatibility */
.landing-footer {
    background: #1f2937;
    padding: 40px 0;
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
}

.footer-text p {
    margin: 0;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .steps-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Medium screens - optimized checklist layout */
@media (min-width: 481px) and (max-width: 1024px) {
    .checklist-section .checklist-items,
    .checklist-card .checklist-items,
    .checklist-items {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
        gap: 16px !important;
    }
    
    .checklist-section {
        padding: 16px;
    }
    
    .education-card {
        padding: 32px;
    }
    
    .hero-stats {
        gap: 32px;
        margin-top: 40px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    /* Pricing responsive - tablet */
    .pricing-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .pricing-card {
        padding: 32px 24px;
    }
    
    .trust-items {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
    
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .nav-content {
        padding: 0 16px;
        flex-wrap: nowrap;
        gap: 8px;
        max-width: 100%;
        width: 100%;
    }
    
    .nav-brand {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    
    .nav-title {
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-logo {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    
    .nav-actions {
        gap: 8px;
        flex-shrink: 0;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 8px;
        white-space: nowrap;
    }
    
    .hero-section {
        padding: 60px 16px 80px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .cta-btn.large {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 24px;
        justify-content: space-around;
        margin-top: 32px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
        max-width: 120px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .section-content {
        padding: 0 16px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 18px;
    }
    
    .features-section,
    .how-it-works-section,
    .auth-section {
        padding: 80px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 32px 24px;
    }
    
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Very small screens - stack steps vertically */
@media (max-width: 480px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .hero-stats {
        gap: 16px;
        margin-top: 24px;
        flex-direction: row;
        justify-content: space-between;
        padding: 0 8px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 70px;
        max-width: 90px;
    }
    
    .stat-number {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .stat-label {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .trust-items {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .trust-item {
        padding: 16px;
    }
    
    .auth-form-container {
        padding: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 12px;
        gap: 6px;
        max-width: 100%;
        width: 100%;
    }
    
    .nav-brand {
        gap: 6px;
        flex: 1;
        min-width: 0;
    }
    
    .nav-title {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-logo {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }
    
    .nav-actions {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .nav-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 6px;
        white-space: nowrap;
        min-width: auto;
    }
    
    .hero-section {
        padding: 40px 12px 60px;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }
    
    .hero-card {
        padding: 24px;
    }
    
    .section-content {
        padding: 0 12px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .feature-title,
    .step-title {
        font-size: 20px;
    }
    
    .cta-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .cta-btn.large {
        padding: 16px 24px;
        font-size: 15px;
    }
}

/* Selection styles */
.message-bubble ::selection {
    background: rgba(102, 126, 234, 0.2);
}

.user-message .message-bubble ::selection {
    background: rgba(255, 255, 255, 0.3);
}

/* Profile Page Styles */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-card .card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.profile-card .card-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-card .card-title h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.profile-card .card-title p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* Profile Form Styles */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.profile-form .form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.profile-form .form-group input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.profile-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profile-form .form-group input[readonly] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

.field-note {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.profile-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* Account Actions Styles */
.account-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.action-item:hover {
    background: #f8fafc;
    border-color: #667eea;
    transform: translateY(-1px);
}

.action-item.danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.action-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-item.danger .action-icon {
    background: #fee2e2;
}

.action-content {
    flex: 1;
}

.action-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.action-item.danger .action-title {
    color: #dc2626;
}

.action-subtitle {
    font-size: 14px;
    color: #6b7280;
}

.action-arrow {
    font-size: 18px;
    color: #9ca3af;
    font-weight: 600;
}

/* Password Modal Specific Styles */
#password-modal .modal-content {
    max-width: 400px;
}

#password-modal .form-group {
    margin-bottom: 16px;
}

#password-modal .form-group:last-child {
    margin-bottom: 0;
}

#password-modal label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

#password-modal input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

#password-modal input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* People Management Styles */
.people-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.person-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.person-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.person-item.default {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
}

.person-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.person-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.person-type-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

.person-item.default .person-type-icon {
    background: #667eea;
    border-color: #667eea;
}

.person-name {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
}

.person-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
}

.person-type {
    text-transform: capitalize;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.person-item.default .person-type {
    background: #667eea;
    color: white;
}

.person-age {
    font-weight: 500;
}

.default-badge {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.person-actions {
    display: flex;
    gap: 8px;
}

.person-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.person-btn:hover {
    background: #e2e8f0;
    color: #374151;
}

.person-btn.edit:hover {
    background: #dbeafe;
    color: #2563eb;
}

.person-btn.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.add-person-section {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.empty-people {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

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

.empty-people h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-weight: 600;
}

.empty-people p {
    margin: 0;
    font-size: 14px;
}

/* Person Modal Styles */
#person-modal .modal-content {
    max-width: 450px;
}

#person-modal .form-group select {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

#person-modal .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#person-modal .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

#person-modal .checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

#person-modal .checkbox-group label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-container {
        padding: 16px;
        max-width: 100%;
    }
    
    .profile-card {
        padding: 20px;
    }
    
    .profile-form .form-actions {
        flex-direction: column;
    }
    
    .profile-form .form-actions .btn {
        width: 100%;
    }
    
    .action-item {
        padding: 14px;
    }
    
    .action-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* ===========================
   BOTTOM NAVIGATION STYLES
   =========================== */

/* Bottom Navigation Container */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    z-index: 99999 !important; /* Below modal overlay (100001) */
    padding: 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    display: block !important; /* Always show - we'll control visibility with media queries */
    width: 100% !important;
    height: auto !important;
}

.bottom-nav-content {
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    max-width: 600px;
    margin: 0 auto;
    padding: 8px 12px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Bottom Nav Items */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 8px 6px;
    min-width: 50px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Nav Icons */
.nav-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.bottom-nav-item .nav-icon svg {
    stroke: #6b7280;
    transition: all 0.2s ease;
}

/* Nav Labels */
.nav-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

/* Active State */
.bottom-nav-item.active .nav-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.bottom-nav-item.active .nav-icon svg {
    stroke: white;
}

.bottom-nav-item.active .nav-label {
    color: #667eea;
    font-weight: 600;
}

/* Hover Effects (Desktop) */
@media (hover: hover) {
    .bottom-nav-item:hover .nav-icon {
        background: rgba(102, 126, 234, 0.1);
        transform: translateY(-1px);
    }
    
    .bottom-nav-item:hover .nav-icon svg {
        stroke: #667eea;
    }
    
    .bottom-nav-item:hover .nav-label {
        color: #667eea;
    }
}

/* FAB in Bottom Nav */
.bottom-nav-item.fab-nav .nav-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-4px);
}

.bottom-nav-item.fab-nav .nav-icon.fab-icon svg {
    stroke: white;
    stroke-width: 2.5;
}

.bottom-nav-item.fab-nav .nav-label {
    color: #667eea;
    font-weight: 600;
    margin-top: 2px;
}

.bottom-nav-item.fab-nav:active .nav-icon {
    transform: translateY(-2px) scale(0.95);
}

/* Main Content Adjustment - Default for desktop */
.main-content {
    padding-bottom: 20px;
}

/* Force bottom nav to show everywhere for debugging */
.bottom-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mobile-only bottom navigation */
@media (max-width: 768px) {
    .bottom-nav {
        display: block !important;
    }
    
    .header-nav {
        display: none;
    }
    
    .header-brand h1 {
        font-size: 20px;
    }
    
    .header-brand .header-date {
        font-size: 13px;
    }
    
    .main-header {
        padding: 12px 20px;
    }
    
    /* Fix main content and container overflow/padding issues */
    .main-container,
    .main-content {
        padding-bottom: 80px !important;
        overflow-y: auto !important;
        min-height: calc(100vh - 80px) !important;
    }
    
    /* Ensure HTML and body don't restrict layout */
    html, body {
        height: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Therapy page specific adjustments */
    body.therapy-page .main-content,
    .therapy-container {
        padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
    }
    
    /* Profile page specific adjustments */
    body.profile-page .main-content,
    .profile-container {
        padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
    }
    
    /* InnerGuide page specific adjustments */
    body.innerguide-page .main-content,
    .chat-container {
        padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
    }
    
    .chat-input-container {
        bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }
}

/* Desktop/Web - Hide bottom nav, keep header nav */
@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
    
    .header-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 20px !important;
    }
}

/* Safe area adjustments for modern phones (mobile only) */
@media (max-width: 768px) {
    @supports (padding: max(0px)) {
        .bottom-nav-content {
            padding-bottom: max(8px, env(safe-area-inset-bottom));
        }
        
        .main-content {
            padding-bottom: max(100px, calc(90px + env(safe-area-inset-bottom))) !important;
        }
    }
}

/* AI Safety Partnership Link Styles */
.nav-btn.tertiary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid transparent;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-btn.tertiary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.footer-links {
    margin: 16px 0;
}

.footer-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive nav adjustments */
@media (max-width: 768px) {
    .nav-btn.tertiary {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .nav-actions {
        gap: 6px;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    
    /* Make tertiary button more compact on mobile */
    .nav-btn.tertiary .btn-icon {
        display: none;
    }
}

/* Hide tertiary button text on very small screens and show icon only */
@media (max-width: 480px) {
    .nav-btn.tertiary {
        padding: 8px;
        font-size: 0;
        min-width: 40px;
        position: relative;
    }
    
    .nav-btn.tertiary .btn-icon {
        display: inline;
        font-size: 16px;
    }
    
    .nav-btn.tertiary::after {
        content: "🤝";
        font-size: 16px;
    }
}

/* iPhone X+ notch and indicator adjustments */
@media screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
    .bottom-nav-content {
        padding-bottom: 24px;
    }
}

@media screen and (device-width: 414px) and (device-height: 896px) {
    .bottom-nav-content {
        padding-bottom: 24px;
    }
}

/* Ultra wide screens */
@media (min-width: 600px) {
    .bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 600px;
        border-radius: 20px 20px 0 0;
        border-left: 1px solid rgba(0, 0, 0, 0.1);
        border-right: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(30, 30, 30, 0.95);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .bottom-nav-item .nav-icon svg {
        stroke: #9ca3af;
    }
    
    .nav-label {
        color: #9ca3af;
    }
    
    .bottom-nav-item.active .nav-label {
        color: #667eea;
    }
    
    @media (hover: hover) {
        .bottom-nav-item:hover .nav-icon {
            background: rgba(102, 126, 234, 0.2);
        }
    }
}

/* Animation for bottom nav appearance */
.bottom-nav {
    animation: slideUpNav 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpNav {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Accessibility improvements */
.bottom-nav-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.bottom-nav-item:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .bottom-nav-item,
    .nav-icon,
    .nav-label {
        transition: none;
    }
    
    .bottom-nav {
        animation: none;
    }
} 