/* Mental Health Tracker - Styles */

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

/* CSS Variables for Theming */
:root {
    /* Mental Health Status Colors */
    --excellent: #2E7D32;     /* Dark Green - Score 5 */
    --great: #4CAF50;         /* Green - Score 4 */
    --good: #8BC34A;          /* Light Green - Score 3 */
    --okay: #FFC107;          /* Yellow/Amber - Score 2 */
    --poor: #FF9800;          /* Orange - Score 1 */
    --critical: #F44336;      /* Red - Score 0 */

    /* Mood Gradients */
    --mood-excellent: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    --mood-great: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    --mood-good: linear-gradient(135deg, #8BC34A 0%, #AED581 100%);
    --mood-okay: linear-gradient(135deg, #FFC107 0%, #FFD54F 100%);
    --mood-poor: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    --mood-critical: linear-gradient(135deg, #F44336 0%, #EF5350 100%);

    /* Stress Level Colors */
    --stress-none: #E8F5E8;       /* Very Light Green */
    --stress-low: #C8E6C9;        /* Light Green */
    --stress-moderate: #FFF3E0;   /* Light Orange */
    --stress-high: #FFCCBC;       /* Orange */
    --stress-extreme: #FFCDD2;    /* Light Red */

    /* Sleep Quality Colors */
    --sleep-excellent: #1A237E;   /* Deep Blue */
    --sleep-good: #3F51B5;        /* Blue */
    --sleep-fair: #9C27B0;        /* Purple */
    --sleep-poor: #E91E63;        /* Pink */
    --sleep-terrible: #F44336;    /* Red */

    /* Legacy Colors */
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #81C784;
    --secondary: #2196F3;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;
    --info: #2196F3;
    
    /* Neutral Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F5;
    --bg-tertiary: #E0E0E0;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-light: #9E9E9E;
    --border: #E0E0E0;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10);
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-index Scale */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-popover: 500;
    --z-tooltip: 600;
    --z-notification: 700;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #2e2e2e;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-light: #808080;
    --border: #3a3a3a;
    --gradient-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    
    /* Update shadows for dark theme */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.5), 0 3px 6px rgba(0,0,0,0.4);
}

/* Base Styles */
html {
    font-size: 16px;
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background var(--transition-slow), color var(--transition-base);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        min-height: auto;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .cta-buttons {
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 50vh;
        padding: 1.5rem 0;
    }
    
    .main-container {
        padding: 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 44px;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    gap: var(--spacing-sm);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #D32F2F;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    font-size: 1.25rem;
}

.btn-google {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border);
    transition: all var(--transition-base);
}

.btn-google:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* Google Sign-In Container */
.google-signin-container {
    width: 100%;
    margin-bottom: var(--spacing-md);
}

.google-signin-container > div {
    width: 100% !important;
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-base);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    height: 48px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    background: var(--bg-primary);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-hint {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Form Validation Styles */
.form-input.input-error {
    border-color: var(--error);
    background-color: rgba(244, 67, 54, 0.05);
}

.form-input.input-error:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.2);
}

.validation-error {
    display: flex;
    align-items: center;
    margin-top: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--error);
    animation: slideDown 0.2s ease-out;
}

.validation-error::before {
    content: '⚠';
    margin-right: var(--spacing-xs);
    font-size: 1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
    margin-right: var(--spacing-xs);
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Button Loading State */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Navigation Bar */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    z-index: var(--z-sticky);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.nav-home {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color var(--transition-fast);
}

.nav-home:hover {
    color: var(--primary);
}

.nav-home svg {
    width: 20px;
    height: 20px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
    margin-right: var(--spacing-md);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.nav-icon {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .nav-links {
        gap: var(--spacing-xs);
    }

    .nav-link span:not(.nav-icon) {
        display: none;
    }
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: var(--z-sticky);
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width var(--transition-slow);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Theme Toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Main App Container */
#app {
    flex: 1;
    padding-top: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(60px + var(--spacing-lg)) 0 var(--spacing-lg) 0;
}

/* Screen Containers */
.screen {
    width: 100%;
    max-width: 600px;
    animation: fadeIn var(--transition-slow);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-title {
    color: white;
    margin-bottom: var(--spacing-md);
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-2xl);
    font-size: 1.125rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.benefit-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.benefit-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.benefit-text {
    color: white;
    font-weight: 500;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.privacy-note {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

/* Authentication Screens */
.auth-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl) var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .auth-container {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

[data-theme="dark"] .auth-container::before {
    background: radial-gradient(circle, rgba(76, 175, 80, 0.08) 0%, transparent 70%);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
    text-align: center;
}

.auth-form {
    margin-bottom: var(--spacing-lg);
}

.divider {
    text-align: center;
    margin: var(--spacing-lg) 0;
    color: var(--text-secondary);
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--spacing-lg);
}

.otp-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5em;
}

/* Dashboard Screen */
.dashboard-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    width: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.today-status {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.status-complete {
    color: var(--success);
    font-weight: 500;
}

.status-pending {
    color: var(--text-primary);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* Action card styles moved to Enhanced Action Cards section (line 359) */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

/* Stat card styles moved to Enhanced Stat Cards section (line 310) */

.recent-entries {
    margin-top: var(--spacing-lg);
}

.recent-entries h3 {
    margin-bottom: var(--spacing-md);
}

/* Enhanced Dashboard Styles */
.header-content {
    flex: 1;
}

.header-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* Today's Status Banner - Professional styling with high contrast */
.today-status-banner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.today-status-banner:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Light theme - Professional green with dark text */
[data-theme="light"] .today-status-banner {
    background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 100%);
    background-color: #f1f8f4;
    border: 2px solid #66bb6a;
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.2);
}

/* Dark theme - Better contrast with bright text */
[data-theme="dark"] .today-status-banner {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(33, 150, 243, 0.15) 100%);
    background-color: rgba(46, 125, 50, 0.15);
    border: 2px solid rgba(129, 199, 132, 0.6);
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.3);
}

.status-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.status-content {
    flex: 1;
}

.status-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.status-subtitle {
    font-size: 0.875rem;
}

/* Light theme - Dark text for high contrast */
[data-theme="light"] .status-title {
    color: #1b5e20;
}

[data-theme="light"] .status-subtitle {
    color: #2e7d32;
}

/* Dark theme - Bright text for high contrast */
[data-theme="dark"] .status-title {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .status-subtitle {
    color: #e8f5e9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.track-today-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    white-space: nowrap;
}

/* GitHub-Style Mood Heatmap */
.mood-heatmap-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Heatmap Legend */
.heatmap-legend {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.legend-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-colors {
    display: flex;
    gap: 3px;
}

.legend-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid var(--border);
}

/* Mood Level Colors (GitHub-style) */
/* Mood levels - Light theme */
.mood-level-0 {
    background: var(--bg-tertiary);
}

.mood-level-1 {
    background: #ffcdd2; /* Light Red */
}

.mood-level-2 {
    background: #fff3e0; /* Light Orange */
}

.mood-level-3 {
    background: #fff9c4; /* Light Yellow */
}

.mood-level-4 {
    background: #c8e6c9; /* Light Green */
}

.mood-level-5 {
    background: #4caf50; /* Solid Green */
}

/* Mood levels - Dark theme (better visibility) */
[data-theme="dark"] .mood-level-0 {
    background: var(--bg-tertiary);
    border-color: var(--border);
}

[data-theme="dark"] .mood-level-1 {
    background: #d32f2f; /* Darker Red */
    border-color: #ef5350;
}

[data-theme="dark"] .mood-level-2 {
    background: #f57c00; /* Darker Orange */
    border-color: #ff9800;
}

[data-theme="dark"] .mood-level-3 {
    background: #fbc02d; /* Darker Yellow */
    border-color: #fdd835;
}

[data-theme="dark"] .mood-level-4 {
    background: #689f38; /* Darker Light Green */
    border-color: #8bc34a;
}

[data-theme="dark"] .mood-level-5 {
    background: #388e3c; /* Darker Solid Green */
    border-color: #4caf50;
}

/* Heatmap Grid */
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(53, 12px); /* 53 weeks in a year */
    grid-auto-rows: 12px;
    gap: 3px;
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
    padding: var(--spacing-sm) 0;
}

.heatmap-day {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.heatmap-day:hover {
    transform: scale(1.2);
    z-index: 10;
    border-color: var(--primary);
}

/* Tooltip for heatmap */
.heatmap-day::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.heatmap-day:hover::after {
    opacity: 1;
}

/* Month Labels */
.month-labels {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-left: var(--spacing-sm);
}

.heatmap-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.heatmap-loading p {
    margin-top: var(--spacing-md);
}

/* Enhanced Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 2rem;
}

.stat-details {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

.stat-primary .stat-icon {
    color: #ff6b6b;
}

.stat-secondary .stat-icon {
    color: #4caf50;
}

.stat-tertiary .stat-icon {
    color: #2196f3;
}

/* Enhanced Action Cards */
.action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: left;
}

.action-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.action-primary {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(76, 175, 80, 0.1) 100%);
}

.action-primary:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.15) 100%);
}

.action-icon {
    font-size: 2rem;
}

.action-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.action-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.action-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: var(--spacing-md);
}

/* Button Text Style */
.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: all var(--transition-fast);
}

.btn-text:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
}

/* Responsive Heatmap */
@media (max-width: 768px) {
    .heatmap-grid {
        grid-template-columns: repeat(auto-fill, 10px);
        grid-auto-rows: 10px;
        gap: 2px;
    }

    .heatmap-day {
        width: 10px;
        height: 10px;
    }

    .legend-box {
        width: 10px;
        height: 10px;
    }

    .today-status-banner {
        flex-direction: column;
        text-align: center;
    }

    .track-today-btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
}

.entry-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.entry-date {
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
}

.entry-mood {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.entry-stress {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.entry-notes {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

/* Mood Screen */
.mood-screen {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
}

.mood-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.mood-header p {
    color: var(--text-secondary);
}

.mood-meter {
    margin-bottom: var(--spacing-2xl);
}

.mood-options {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.mood-option {
    flex: 1;
    padding: var(--spacing-lg);
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-primary);
}

.mood-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.mood-option.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mood-emoji {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
    display: block;
}

.mood-label {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Details Screen */
.details-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
}

.detail-section {
    margin-bottom: var(--spacing-2xl);
}

.detail-section h3 {
    margin-bottom: var(--spacing-md);
}

.range-input {
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.quality-options,
.stress-scale {
    display: flex;
    gap: var(--spacing-sm);
}

.quality-btn,
.scale-btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.quality-btn:hover,
.scale-btn:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.quality-btn.selected,
.scale-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.factor-chips,
.activity-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.chip {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.875rem;
}

.chip:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.button-group {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

/* Questions Screen */
.questions-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-2xl);
}

.question-card {
    margin-bottom: var(--spacing-lg);
}

.question-number {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.question-text {
    margin-bottom: var(--spacing-lg);
}

.question-input {
    margin-bottom: var(--spacing-lg);
}

.question-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Suggestions Screen */
.suggestions-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.suggestions-list {
    margin-bottom: var(--spacing-2xl);
}

.suggestion-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-align: left;
}

.suggestion-number {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
    color: var(--text-primary);
}

.suggestions-actions {
    margin-top: var(--spacing-2xl);
}

/* Progress Screen */
.progress-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    width: 100%;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Calendar View */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--spacing-xs);
}

.calendar-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: var(--spacing-sm);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.calendar-day:hover {
    background: var(--bg-secondary);
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.today {
    border-color: var(--primary);
    border-width: 2px;
}

.day-number {
    font-size: 0.875rem;
}

.mood-indicator {
    position: absolute;
    bottom: 2px;
    font-size: 0.75rem;
}

/* Calendar mood colors - Light theme */
.calendar-day.mood-1 { background: rgba(239, 83, 80, 0.1); }
.calendar-day.mood-2 { background: rgba(255, 152, 0, 0.1); }
.calendar-day.mood-3 { background: rgba(255, 193, 7, 0.1); }
.calendar-day.mood-4 { background: rgba(139, 195, 74, 0.1); }
.calendar-day.mood-5 { background: rgba(76, 175, 80, 0.1); }

/* Calendar mood colors - Dark theme (better visibility) */
[data-theme="dark"] .calendar-day.mood-1 { background: rgba(239, 83, 80, 0.3); }
[data-theme="dark"] .calendar-day.mood-2 { background: rgba(255, 152, 0, 0.3); }
[data-theme="dark"] .calendar-day.mood-3 { background: rgba(255, 193, 7, 0.3); }
[data-theme="dark"] .calendar-day.mood-4 { background: rgba(139, 195, 74, 0.3); }
[data-theme="dark"] .calendar-day.mood-5 { background: rgba(76, 175, 80, 0.3); }

/* Charts */
.chart-container {
    margin-bottom: var(--spacing-2xl);
}

.chart-container h3 {
    margin-bottom: var(--spacing-md);
}

.chart-container canvas {
    max-height: 300px;
}

/* Insights */
.insight-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.insight-icon {
    font-size: 1.5rem;
}

.insight-text {
    flex: 1;
}

/* Export Screen */
.export-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
}

.export-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.export-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.export-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--spacing-sm);
}

.export-format {
    font-weight: 600;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.export-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.date-range-selector {
    margin-bottom: var(--spacing-2xl);
}

.date-inputs {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-md);
}

/* Settings Screen */
.settings-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    width: 100%;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.settings-section {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
    border-bottom: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
    padding: var(--spacing-sm) 0;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Modal */
.modal,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--spacing-md);
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.close-btn,
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    transition: all var(--transition-fast);
}

.close-btn:hover,
.modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.modal-body {
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.detail-item {
    margin-bottom: var(--spacing-md);
}

.detail-item strong {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    z-index: var(--z-notification);
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: var(--success);
}

.notification-error {
    background: var(--error);
}

.notification-info {
    background: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .mood-options {
        flex-wrap: wrap;
    }
    
    .mood-option {
        min-width: 80px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .date-inputs {
        flex-direction: column;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary: #00FF00;
        --text-primary: #FFFFFF;
        --bg-primary: #000000;
        --border: #FFFFFF;
    }
}

/* Mental Health Status Classes */
.status-excellent {
    background: var(--mood-excellent);
    color: white;
    border-color: var(--excellent);
}

.status-great {
    background: var(--mood-great);
    color: white;
    border-color: var(--great);
}

.status-good {
    background: var(--mood-good);
    color: white;
    border-color: var(--good);
}

.status-okay {
    background: var(--mood-okay);
    color: rgba(0,0,0,0.8);
    border-color: var(--okay);
}

.status-poor {
    background: var(--mood-poor);
    color: white;
    border-color: var(--poor);
}

.status-critical {
    background: var(--mood-critical);
    color: white;
    border-color: var(--critical);
}

/* Stress Level Indicators */
.stress-none { background-color: var(--stress-none); }
.stress-low { background-color: var(--stress-low); }
.stress-moderate { background-color: var(--stress-moderate); }
.stress-high { background-color: var(--stress-high); }
.stress-extreme { background-color: var(--stress-extreme); }

/* Sleep Quality Indicators */
.sleep-excellent { background-color: var(--sleep-excellent); color: white; }
.sleep-good { background-color: var(--sleep-good); color: white; }
.sleep-fair { background-color: var(--sleep-fair); color: white; }
.sleep-poor { background-color: var(--sleep-poor); color: white; }
.sleep-terrible { background-color: var(--sleep-terrible); color: white; }

/* Analytics Cards with Status Colors */
.analytics-card.excellent {
    background: linear-gradient(145deg, var(--excellent) 0%, var(--great) 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(46, 125, 50, 0.3);
}

.analytics-card.great {
    background: linear-gradient(145deg, var(--great) 0%, var(--good) 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
}

.analytics-card.good {
    background: linear-gradient(145deg, var(--good) 0%, var(--okay) 100%);
    color: rgba(0,0,0,0.8);
    box-shadow: 0 8px 32px rgba(139, 195, 74, 0.3);
}

.analytics-card.okay {
    background: linear-gradient(145deg, var(--okay) 0%, var(--poor) 100%);
    color: rgba(0,0,0,0.8);
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.3);
}

.analytics-card.poor {
    background: linear-gradient(145deg, var(--poor) 0%, var(--critical) 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(255, 152, 0, 0.3);
}

.analytics-card.critical {
    background: var(--mood-critical);
    color: white;
    box-shadow: 0 8px 32px rgba(244, 67, 54, 0.4);
    border: 2px solid var(--critical);
}

/* Trend Indicators */
.trend-up {
    color: var(--great);
    font-weight: bold;
}

.trend-down {
    color: var(--poor);
    font-weight: bold;
}

.trend-stable {
    color: var(--good);
    font-weight: bold;
}

/* Progress Rings with Status Colors */
.progress-ring.excellent .progress-circle {
    stroke: var(--excellent);
}

.progress-ring.great .progress-circle {
    stroke: var(--great);
}

.progress-ring.good .progress-circle {
    stroke: var(--good);
}

.progress-ring.okay .progress-circle {
    stroke: var(--okay);
}

.progress-ring.poor .progress-circle {
    stroke: var(--poor);
}

.progress-ring.critical .progress-circle {
    stroke: var(--critical);
}

/* Enhanced Analytics Styles */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.score-display {
    text-align: right;
}

.score {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.out-of {
    font-size: 1.2rem;
    opacity: 0.8;
}

.status-label {
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.trends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.trend-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.trend-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.trend-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.factors-list, .activities-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.factor-item, .activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}

.factor-name, .activity-name {
    font-weight: 500;
}

.factor-count, .activity-count {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: bold;
}

.weekly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.day-summary {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.day-name {
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.day-mood {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.day-score {
    font-size: 0.9rem;
    font-weight: bold;
}

/* Dark theme adjustments for analytics */
[data-theme="dark"] .factor-item,
[data-theme="dark"] .activity-item {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .trend-item {
    background: rgba(255, 255, 255, 0.05);
}

/* Enhanced Dashboard Status Styles */
.status-complete {
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid transparent;
    margin-bottom: 1rem;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-emoji {
    font-size: 2rem;
}

.status-text {
    font-size: 1.2rem;
    font-weight: bold;
}

.status-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.status-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
}

.metric-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.status-pending {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 2px dashed var(--primary);
}

.pending-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pending-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.status-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stress Level Metric Colors */
.metric-value.stress-none { color: var(--excellent); }
.metric-value.stress-low { color: var(--great); }
.metric-value.stress-moderate { color: var(--okay); }
.metric-value.stress-high { color: var(--poor); }
.metric-value.stress-extreme { color: var(--critical); }

/* Analytics Dashboard Styles */
.analytics-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

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

.metric-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.metric-details {
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.9rem;
    font-weight: bold;
}

.metric-trend.positive {
    color: var(--great);
}

.metric-trend.negative {
    color: var(--poor);
}

.metric-status {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Charts Section */
.charts-section, .comparison-section {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.chart-container {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 1rem;
    height: 300px;
}

/* Comparison Styles */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.comparison-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comparison-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.comparison-change {
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.comparison-change.positive {
    background: rgba(76, 175, 80, 0.2);
    color: var(--great);
}

.comparison-change.negative {
    background: rgba(244, 67, 54, 0.2);
    color: var(--critical);
}

.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 80px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.bar-value {
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

/* Responsive analytics */
@media (max-width: 768px) {
    .trends-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .weekly-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .score {
        font-size: 2rem;
    }

    .analytics-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .status-details {
        grid-template-columns: 1fr;
    }

    .status-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ========================================
   ENHANCED CHECK-IN FLOW STYLES
   ======================================== */

/* Check-in Container */
.checkin-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Progress Indicator */
.checkin-progress {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease-in-out;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Question Section */
.question-section {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.question-header {
    margin-bottom: 2rem;
    text-align: center;
}

.question-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

/* Answer Options (Mood Buttons) */
.answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.answer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-btn:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.answer-btn.selected {
    border-color: var(--primary);
    border-width: 3px;
    background: var(--bg-tertiary);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
    transform: scale(1.05);
}

[data-theme="dark"] .answer-btn.selected {
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.3);
}

.answer-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.answer-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Text Answer Section */
.text-answer-section,
.custom-answer-section {
    margin-bottom: 2rem;
}

.answer-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.answer-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-counter {
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Loading Next Question */
.loading-next-question {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.loading-next-question p {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Check-in Actions */
.checkin-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

#submitAnswerBtn {
    min-width: 200px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

#submitAnswerBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Q&A History */
.qa-history {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color);
}

.qa-history-item {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: fadeInUp 0.4s ease;
}

.qa-question {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.qa-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.qa-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.qa-answer {
    font-size: 1rem;
    color: var(--text-primary);
    padding-left: 1.5rem;
}

/* Completion Modal */
.completion-modal {
    max-width: 600px;
}

.completion-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

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

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Suggestions Section */
.suggestions-section {
    margin-bottom: 2rem;
}

.suggestions-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.suggestion-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.suggestion-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
}

.suggestion-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Suggested Habits Section */
.suggested-habits-section {
    margin-top: 2rem;
}

.suggested-habits-section h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.habits-intro {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.habits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.habit-suggestion-card {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.habit-suggestion-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.habit-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.habit-reason {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.4s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkin-container {
        padding: 1rem;
    }

    .question-section {
        padding: 1.5rem;
    }

    .question-title {
        font-size: 1.5rem;
    }

    .answer-options {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .answer-btn {
        padding: 1.25rem 0.75rem;
    }

    .answer-emoji {
        font-size: 2rem;
    }

    .completion-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .habits-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .btn, .progress-bar, .theme-toggle {
        display: none;
    }

    .modal {
        position: static;
        background: none;
    }
}