/* ============================================
   PREMIUM JOURNALING APP - STYLES
   ============================================ */

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

:root {
    /* Rich Dark Color Palette - Enhanced for Accessibility */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a28;
    --bg-glass: rgba(18, 18, 26, 0.9);
    --bg-glass-light: rgba(26, 26, 40, 0.7);
    
    /* Shiny Effects */
    --shiny-gradient: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    --accent-glow: rgba(139, 92, 246, 0.6);
    
    /* Text Colors - Enhanced Contrast */
    --text-primary: #ffffff;
    --text-secondary: #c8c8d8; /* Lighter for better contrast */
    --text-muted: #9898a8; /* Lighter for better readability */
    
    /* Accent Colors - Enhanced for Accessibility */
    --accent-primary: #8b5cf6;
    --accent-secondary: #a78bfa;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
    --accent-hover: #7c3aed;
    
    /* Functional Colors - Enhanced Contrast */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Mood Colors - Enhanced Contrast */
    --mood-happy: #fbbf24;
    --mood-calm: #34d399;
    --mood-stressed: #f87171;
    --mood-motivated: #60a5fa;
    --mood-creative: #a78bfa;
    --mood-tired: #9ca3af;
    --mood-excited: #f472b6;
    
    /* Border Colors - Enhanced for Visibility */
    --border-subtle: rgba(255, 255, 255, 0.15); /* More visible */
    --border-medium: rgba(255, 255, 255, 0.22); /* More visible */
    --border-strong: rgba(255, 255, 255, 0.3); /* More visible */
    --border-shiny: rgba(255, 255, 255, 0.25);
    
    /* Shadows - Enhanced */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.4);
    --shadow-shiny: 0 0 25px rgba(255, 255, 255, 0.15);
    
    /* Glass Effects - Enhanced */
    --glass-blur: blur(24px);
    --glass-blur-light: blur(16px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.15); /* More visible */
    --glass-shine: 1px solid rgba(255, 255, 255, 0.25);
    
    /* Spacing */
    --nav-height: 80px;
    --header-height: 70px;
    
    /* Animation - Enhanced */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Border Radius - Enhanced */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   AUTH SECTION - PREMIUM DESIGN
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

/* Animated Background */
.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(167, 139, 250, 0.1) 0%, transparent 50%);
    animation: gradientMove 20s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, -2%); }
}

.auth-page {
    width: 100%;
    max-width: 420px;
    display: none;
    position: relative;
    z-index: 1;
}

.auth-page.active {
    display: block;
    animation: fadeInUp 0.6s ease;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-title {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 400;
}

.auth-form {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    border: var(--glass-border);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.625rem;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1rem 1.125rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

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

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), var(--shadow-glow);
    background: rgba(26, 26, 40, 0.9);
}

.form-input:invalid {
    border-color: var(--danger);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.25rem;
    height: 4px;
}

.password-strength-bar {
    flex: 1;
    background: var(--border-subtle);
    border-radius: 2px;
    transition: background var(--transition-normal);
}

.password-strength-bar.weak {
    background: var(--danger);
}

.password-strength-bar.medium {
    background: var(--warning);
}

.password-strength-bar.strong {
    background: var(--success);
}

.password-requirements {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-requirements li::before {
    content: '✓';
    color: var(--text-muted);
    font-weight: 600;
}

.password-requirements li.met::before {
    color: var(--success);
}

.form-textarea {
    width: 100%;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1rem 1.125rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    resize: vertical;
    transition: all var(--transition-normal);
    line-height: 1.6;
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: rgba(26, 26, 40, 0.8);
}

.auth-btn {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.auth-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 var(--transition-slow);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

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

.bypass-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.bypass-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.bypass-btn::before {
    display: none;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 400;
}

.auth-switch a {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.auth-switch a:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* ============================================
   APP CONTAINER & HEADER
   ============================================ */

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

/* Premium Header */
.app-header {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.625rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.icon-btn svg {
    transition: transform var(--transition-normal);
}

.icon-btn:hover svg {
    transform: rotate(45deg);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border-radius: var(--radius-full);
    border: var(--glass-border);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.user-profile:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    box-shadow: var(--shadow-sm);
}

.user-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sign-out-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sign-out-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
    transform: translateY(-1px);
}

.sign-out-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   PAGES & MAIN CONTENT
   ============================================ */

/* Page Transitions */
.page {
    display: none;
    flex: 1;
    animation: fadeIn 0.4s ease;
}

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

.page.active {
    display: block;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 1.5rem;
    padding-bottom: calc(var(--nav-height) + 2rem);
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

/* Section Styling */
section {
    margin-bottom: 2rem;
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* Stats Summary */
.stats-summary {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   WRITE SECTION - PREMIUM
   ============================================ */

.write-section {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
}

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

.write-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.template-select {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.template-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.template-select:hover {
    border-color: var(--border-medium);
}

/* ============================================
   TEMPLATES SECTION - PREMIUM
   ============================================ */

.templates-section {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
}

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

.templates-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.create-template-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.create-template-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 var(--transition-slow);
}

.create-template-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.templates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.template-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.template-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.template-card:hover::before {
    opacity: 1;
}

.template-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    letter-spacing: -0.01em;
}

.template-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.template-content {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.template-content p {
    margin-bottom: 0.5rem;
}

/* ============================================
   MODAL - PREMIUM
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    border: var(--glass-border);
    box-shadow: var(--shadow-xl), var(--shadow-shiny);
    animation: slideUp 0.4s ease;
    position: relative;
    overflow-y: auto;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

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

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-close {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-submit {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.modal-submit::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 var(--transition-slow);
}

.modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.modal-submit:hover::before {
    left: 100%;
}

/* Sign Out Button */
.sign-out-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.sign-out-btn {
    width: 100%;
    background: var(--bg-tertiary);
    color: var(--danger-color, #ef4444);
    border: 1px solid var(--border-medium);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sign-out-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color, #ef4444);
    transform: translateY(-1px);
}

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

/* Drawing Pad Modal */
.drawing-modal-content {
    max-width: 800px;
    padding: 1.5rem;
}

.drawing-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: var(--border-subtle);
}

.drawing-colors {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.drawing-color-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
    padding: 0.25rem;
}

.drawing-color-btn:hover {
    transform: scale(1.1);
}

.drawing-color-btn.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
    transform: scale(1.15);
}

.drawing-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.drawing-tool-btn {
    background: var(--bg-glass-light);
    border: var(--border-subtle);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 60px;
}

.tool-text {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.drawing-tool-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.drawing-tool-btn.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
}

.brush-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brush-size-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.brush-size input {
    width: 100px;
    accent-color: var(--accent-color);
}

.canvas-size-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.size-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.size-input {
    width: 80px;
    padding: 0.5rem;
    background: var(--bg-glass-light);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.size-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

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

.resize-canvas-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

.drawing-canvas-container {
    background: var(--bg-primary);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    max-height: 500px;
    padding: 1rem;
}

.drawing-canvas {
    background: #ffffff;
    cursor: crosshair;
    touch-action: none;
    box-shadow: var(--shadow-md);
}

.drawing-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.drawing-cancel-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: var(--border-subtle);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.drawing-cancel-btn:hover {
    background: var(--bg-glass-light);
    transform: translateY(-1px);
}

.drawing-save-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.drawing-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.drawing-preview {
    position: relative;
    margin-top: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: var(--border-subtle);
}

.drawing-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    background: white;
}

/* ============================================
   THEME SYSTEM
   ============================================ */

.theme-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.theme-swatch {
    padding: 0.75rem;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-glass-light);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.theme-swatch::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shiny-gradient);
    transition: left var(--transition-slow);
}

.theme-swatch:hover::before {
    left: 100%;
}

.theme-swatch:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    border-color: var(--border-shiny);
}

.theme-swatch.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3), var(--shadow-glow);
    transform: scale(1.1);
}

/* ============================================
   SETTINGS UI ENHANCEMENTS
   ============================================ */

.settings-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.feature-btn {
    width: 100%;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.feature-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    border-color: var(--border-shiny);
}

/* ============================================
   STREAK DISPLAY
   ============================================ */

.streak-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

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

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

.streak-count {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.125rem;
}

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

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.header-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.header-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

/* ============================================
   ANALYTICS DASHBOARD
   ============================================ */

.analytics-content {
    max-width: 800px;
    padding: 2rem;
}

.analytics-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

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

.mood-chart-container {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.mood-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.mood-bar-label {
    width: 100px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.mood-bar-track {
    flex: 1;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.mood-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    transition: width 1s ease;
}

.mood-bar-value {
    width: 40px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: right;
}

.mood-insights {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.insights-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.insight-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--accent-primary);
}

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

.insight-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   EXPORT MODAL
   ============================================ */

.export-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.export-option {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    position: relative;
    overflow: hidden;
}

.export-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shiny-gradient);
    transition: left var(--transition-slow);
}

.export-option:hover::before {
    left: 100%;
}

.export-option:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-shiny);
}

.export-icon {
    font-size: 2.5rem;
}

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

/* ============================================
   SEARCH MODAL
   ============================================ */

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input {
    width: 100%;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), var(--shadow-glow);
}

.search-filters {
    display: flex;
    gap: 1rem;
}

.filter-select {
    flex: 1;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-result-item {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.search-result-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
    border-color: var(--border-shiny);
}

.no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* ============================================
   ACHIEVEMENTS MODAL
   ============================================ */

.achievements-content {
    max-width: 700px;
    padding: 2rem;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.achievement-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(0.5);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.achievement-card.unlocked::before {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

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

.achievement-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.achievement-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.achievement-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.achievement-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Onboarding Modal */
.onboarding-content {
    max-width: 600px;
    padding: 2rem;
    animation: slideUp 0.5s ease;
}

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

.onboarding-subtitle {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.onboarding-steps {
    margin-bottom: 2rem;
    min-height: 300px;
}

.onboarding-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.onboarding-step.active {
    display: block;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-glow);
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.theme-option {
    padding: 1.25rem;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-glass-light);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.theme-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shiny-gradient);
    transition: left var(--transition-slow);
}

.theme-option:hover::before {
    left: 100%;
}

.theme-option:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    border-color: var(--border-shiny);
}

.theme-option.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3), var(--shadow-glow);
    transform: scale(1.1);
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}

.onboarding-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.onboarding-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shiny-gradient);
    transition: left var(--transition-slow);
}

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

.onboarding-btn.primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.onboarding-btn.primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.onboarding-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.onboarding-btn.secondary:hover {
    background: var(--bg-glass-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 1.25rem;
    background: var(--bg-glass-light);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.checkbox-label:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
    border-color: var(--border-shiny);
}

.checkbox-input {
    width: 24px;
    height: 24px;
    accent-color: var(--accent-primary);
    margin-top: 0.25rem;
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
}

/* Custom Theme Section */
.custom-theme-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: var(--border-subtle);
}

.custom-color-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.color-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-input {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: var(--radius-md);
}

.generate-theme-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.generate-theme-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 var(--transition-slow);
}

.generate-theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.generate-theme-btn svg {
    transition: transform var(--transition-normal);
}

.generate-theme-btn:hover svg {
    transform: rotate(45deg);
}

/* Confirmation Dialog */
.confirm-dialog {
    max-width: 400px;
    text-align: center;
    padding: 2rem;
}

.confirm-icon {
    color: var(--warning);
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.confirm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.confirm-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-cancel {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.confirm-cancel:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.confirm-approve {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.confirm-approve:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ============================================
   BOTTOM NAVIGATION - PREMIUM
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 1rem;
    z-index: 100;
    height: var(--nav-height);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    max-width: 100px;
    position: relative;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-normal);
}

.nav-item span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-item:hover {
    background: var(--bg-glass-light);
    color: var(--text-secondary);
    transform: translateY(-2px);
}

.nav-item:hover svg {
    transform: scale(1.1);
}

.nav-item.active {
    color: var(--accent-primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--accent-primary);
}

.nav-item.active svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

/* New Entry Section */
.new-entry-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

/* ============================================
   PROMPT CONTAINER - PREMIUM
   ============================================ */

.prompt-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    border: var(--glass-border);
}

.prompt-box {
    flex: 1;
    min-width: 200px;
}

.prompt-label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.prompt-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--accent-secondary);
    font-style: italic;
    line-height: 1.5;
}

.prompt-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.prompt-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: rotate(180deg);
    box-shadow: var(--shadow-glow);
}

.prompt-btn svg {
    transition: transform var(--transition-normal);
}

/* ============================================
   MOOD SELECTOR - PREMIUM
   ============================================ */

.mood-selector {
    margin-bottom: 2rem;
}

.mood-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
    letter-spacing: 0.01em;
}

.mood-buttons {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.mood-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 2px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.75rem 0.875rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    min-width: 75px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.mood-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shiny-gradient);
    transition: left var(--transition-slow);
}

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

.mood-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    border-color: var(--border-shiny);
}

.mood-btn.selected {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.mood-text {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.mood-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mood-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.mood-btn:hover::before {
    opacity: 1;
}

.mood-btn.selected {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.mood-emoji {
    font-size: 1.75rem;
    transition: transform var(--transition-normal);
}

.mood-btn:hover .mood-emoji {
    transform: scale(1.2);
}

.mood-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   ENTRY FORM - PREMIUM
   ============================================ */

.entry-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.entry-textarea {
    width: 100%;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1.0625rem;
    font-family: inherit;
    font-weight: 400;
    line-height: 1.7;
    resize: vertical;
    transition: all var(--transition-normal);
    min-height: 200px;
}

.entry-textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.entry-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1), var(--shadow-md);
    background: rgba(26, 26, 40, 0.8);
}

/* ============================================
   MEDIA SECTION - PREMIUM
   ============================================ */

.media-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.media-buttons {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.media-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.media-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.media-btn svg {
    flex-shrink: 0;
    transition: transform var(--transition-normal);
}

.media-btn:hover svg {
    transform: scale(1.1);
}

/* Image Preview */
.image-preview {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.image-preview img {
    max-width: 100%;
    max-height: 350px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.remove-image-btn:hover {
    background: var(--danger);
    transform: scale(1.15);
}

/* Audio Status */
.audio-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border-radius: var(--radius-lg);
    border: var(--glass-border);
    box-shadow: var(--shadow-md);
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.recording-dot {
    width: 14px;
    height: 14px;
    background: var(--danger);
    border-radius: var(--radius-full);
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px var(--danger);
}

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

.stop-recording-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.stop-recording-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Audio Playback */
.audio-playback {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border-radius: var(--radius-lg);
    border: var(--glass-border);
    box-shadow: var(--shadow-md);
}

.audio-playback audio {
    flex: 1;
    height: 44px;
    border-radius: var(--radius-sm);
}

.remove-audio-btn {
    background: rgba(239, 68, 68, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.remove-audio-btn:hover {
    background: var(--danger);
    transform: scale(1.15);
}

/* Save Button */
.save-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    align-self: flex-start;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.save-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 var(--transition-slow);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

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

.save-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.save-btn:disabled::before {
    display: none;
}

/* ============================================
   SEARCH SECTION - PREMIUM
   ============================================ */

.search-section {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    margin-bottom: 2rem;
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.search-bar {
    position: relative;
    margin-bottom: 1.25rem;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color var(--transition-normal);
}

.search-input {
    width: 100%;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1rem 1rem 1rem 3.25rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 400;
    transition: all var(--transition-normal);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.search-input:focus + .search-icon {
    color: var(--accent-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.filter-buttons {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.filter-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* ============================================
   ENTRIES SECTION - PREMIUM
   ============================================ */

.entries-section {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.entries-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
    letter-spacing: -0.02em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.empty-state-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.empty-state-action {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.empty-state-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.empty-state-action svg {
    transition: transform var(--transition-normal);
}

.empty-state-action:hover svg {
    transform: translateX(2px);
}

/* Entry Card - Premium */
.entry-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: var(--glass-border);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.entry-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
}

.entry-card:hover::before {
    opacity: 1;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.entry-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.entry-mood {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.entry-mood.happy {
    background: rgba(251, 191, 36, 0.2);
    color: var(--mood-happy);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.entry-mood.calm {
    background: rgba(52, 211, 153, 0.2);
    color: var(--mood-calm);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.entry-mood.stressed {
    background: rgba(248, 113, 113, 0.2);
    color: var(--mood-stressed);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.entry-mood.motivated {
    background: rgba(96, 165, 250, 0.2);
    color: var(--mood-motivated);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.entry-text {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    white-space: pre-wrap;
    font-weight: 400;
}

.entry-media {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.entry-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.entry-audio {
    width: 100%;
    border-radius: var(--radius-md);
}

.entry-actions {
    display: flex;
    gap: 0.625rem;
    margin-top: 1.25rem;
    justify-content: flex-end;
}

.entry-action-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.entry-action-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.entry-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* ============================================
   RESPONSIVE DESIGN - PREMIUM
   ============================================ */

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        padding-bottom: calc(var(--nav-height) + 1.5rem);
    }
    
    .write-header,
    .templates-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .template-select,
    .create-template-btn {
        width: 100%;
    }
    
    .mood-buttons {
        gap: 0.5rem;
    }
    
    .mood-btn {
        min-width: 55px;
        padding: 0.5rem 0.625rem;
        font-size: 1.25rem;
    }
    
    .mood-text {
        font-size: 0.6rem;
    }
    
    .media-buttons {
        flex-direction: column;
    }
    
    .media-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-buttons {
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 60px;
        font-size: 0.8125rem;
    }
    
    .templates-list {
        grid-template-columns: 1fr;
    }
    
    .auth-form {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-title {
        font-size: 2.25rem;
    }
    
    .header-title {
        font-size: 1.25rem;
    }
    
    .main-content {
        padding: 0.75rem;
        padding-bottom: calc(var(--nav-height) + 1rem);
    }
    
    .write-section,
    .templates-section,
    .search-section,
    .entries-section {
        padding: 1.5rem;
    }
    
    .prompt-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .prompt-btn {
        width: 100%;
    }
    
    .nav-item span {
        font-size: 0.6875rem;
    }
    
    .nav-item {
        padding: 0.625rem 0.75rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .modal-content {
        padding: 1.75rem;
    }
    
    .user-email {
        display: none;
    }
}

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

.landing-page {
    display: block;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    color: var(--text-primary);
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-normal);
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-cta {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    min-height: 100vh;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-btn {
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shiny-gradient);
    transition: left var(--transition-slow);
}

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

.hero-btn.primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.hero-btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.hero-btn.secondary {
    background: var(--bg-glass-light);
    color: var(--text-primary);
    border: var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.hero-btn.secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    border-color: var(--border-shiny);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.journal-preview {
    width: 300px;
    height: 400px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: var(--radius-xl);
    border: var(--glass-border);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.preview-page {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-date {
    font-size: 0.875rem;
    color: #666;
    font-weight: 600;
}

.preview-mood {
    font-size: 2rem;
}

.preview-text {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    flex: 1;
}

.features-section {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

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

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.pricing-section {
    padding: 6rem 2rem;
    text-align: center;
}

.pricing-card {
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-header {
    margin-bottom: 2rem;
}

.pricing-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 4rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-period {
    color: var(--text-secondary);
    font-size: 1rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.pricing-feature {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.pricing-feature:last-child {
    border-bottom: none;
}

.pricing-cta {
    width: 100%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.pricing-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.landing-footer {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-tagline {
    color: var(--text-secondary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        padding: 6rem 1.5rem 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .journal-preview {
        width: 250px;
        height: 350px;
    }
}

/* ============================================
   LOADING STATES - PREMIUM
   ============================================ */

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

.loading-spinner.large {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

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

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.skeleton-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.skeleton-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: var(--glass-border);
}

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

.skeleton-date {
    width: 150px;
    height: 1rem;
}

.skeleton-mood {
    width: 80px;
    height: 1.5rem;
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-text {
    height: 1rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.glass {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
}

.glass-light {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

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

/* ============================================
   ACCESSIBILITY - KEYBOARD NAVIGATION
   ============================================ */

/* Skip to main content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: white;
    padding: 8px 16px;
    z-index: 1000;
    transition: top 0.3s;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Enhanced focus states for keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Ensure interactive elements are keyboard accessible */
button,
input,
textarea,
select {
    min-height: 44px; /* WCAG touch target size */
}

button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Remove default focus styles when using focus-visible */
button:focus:not(:focus-visible) {
    outline: none;
}

input:focus:not(:focus-visible) {
    outline: none;
}

textarea:focus:not(:focus-visible) {
    outline: none;
}

select:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   MOBILE APP DESIGN
   ============================================ */

.mobile-header {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    padding: 1.5rem 1.25rem;
    padding-bottom: calc(1.5rem + 60px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.greeting {
    flex: 1;
}

.greeting-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.date-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.header-action-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.header-action-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

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

/* Home Screen */
.prompt-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin: 1.25rem;
    position: relative;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    overflow: hidden;
}

.prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

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

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

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

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

.prompt-content {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 2rem 0 0;
}

.refresh-prompt-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.refresh-prompt-btn:hover {
    background: var(--bg-tertiary);
    transform: rotate(180deg);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
}

.action-btn {
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg), var(--shadow-shiny);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--transition-slow);
}

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

.action-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.primary-btn {
    background: var(--accent-gradient);
}

.secondary-btn {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.secondary-btn:hover {
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-shiny);
}

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

.tertiary-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.tertiary-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--border-shiny);
}

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

.btn-text {
    font-size: 1.125rem;
}

/* Enhanced Flipbook Animations */
.flipbook-page {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-shiny);
}

.flipbook-page.page-flip-in {
    animation: pageFlipIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.flipbook-page.page-flip-out {
    animation: pageFlipOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes pageFlipIn {
    0% {
        transform: rotateY(-90deg) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: rotateY(-45deg) scale(0.95);
        opacity: 0.5;
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes pageFlipOut {
    0% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotateY(45deg) scale(0.95);
        opacity: 0.5;
    }
    100% {
        transform: rotateY(90deg) scale(0.8);
        opacity: 0;
    }
}

.flipbook {
    perspective: 2000px;
    transform-style: preserve-3d;
}

.flipbook-page.hidden {
    transform: rotateY(-90deg) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

.flipbook-page.hidden-right {
    transform: rotateY(90deg) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

/* Page shadow effect for realism */
.flipbook-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.1) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.1) 100%);
    pointer-events: none;
    border-radius: var(--radius-lg);
}

/* Enhanced button hover effects */
.flipbook-controls button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Page indicator animation */
#pageIndicator {
    transition: all 0.3s ease;
}

.flipbook-controls button:active {
    transform: scale(0.95);
}

/* Write Screen */
.write-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
}

.back-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.back-btn:hover {
    background: var(--bg-tertiary);
}

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

/* Pen Color Selector */
.pen-color-selector {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: var(--border-subtle);
}

.pen-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.pen-colors {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pen-color-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    flex-shrink: 0;
}

.pen-color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.pen-color-btn.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
    transform: scale(1.15);
}

.pen-color-btn.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 1rem;
    font-weight: bold;
}

.save-entry-btn {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

.write-prompt {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin: 1.25rem;
}

.prompt-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.write-prompt .prompt-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0.5rem 0 0 0;
}

.entry-textarea {
    width: 100%;
    min-height: 200px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin: 0 1.25rem 1.25rem;
    font-size: 1rem;
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.entry-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), var(--shadow-glow);
}

.mood-selector {
    padding: 0 1.25rem 1.25rem;
}

.mood-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.mood-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mood-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: auto;
    min-width: 55px;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all var(--transition-normal);
}

.mood-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

.mood-btn.selected {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.mood-text {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.media-section {
    padding: 0 1.25rem 1.25rem;
}

.media-btn-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.media-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.media-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

.image-preview {
    position: relative;
    margin-top: 1rem;
}

.image-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.remove-media-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.audio-playback {
    margin-top: 1rem;
}

.audio-playback audio {
    width: 100%;
}

/* Diary Flipbook Screen */
.diary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
}

.diary-options-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.diary-options-btn:hover {
    background: var(--bg-tertiary);
}

.flipbook-container {
    padding: 1.25rem;
    min-height: 400px;
}

.flipbook {
    position: relative;
    width: 100%;
    height: 500px;
    perspective: 1000px;
}

.flipbook-page {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    overflow-y: auto;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    box-shadow: var(--shadow-lg), var(--shadow-shiny);
}

.flipbook-page.hidden {
    transform: rotateY(-180deg);
    pointer-events: none;
}

.flipbook-page.hidden-right {
    transform: rotateY(180deg);
    pointer-events: none;
}

.entry-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.entry-mood {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.entry-text {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.flipbook-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.flipbook-btn {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.flipbook-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

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

.page-indicator {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.empty-diary {
    text-align: center;
    padding: 3rem 1.25rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

.empty-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
}

.start-writing-btn {
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

/* ============================================
   SKELETON LOADING
   ============================================ */

.skeleton-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-secondary);
}

.skeleton-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.skeleton-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   OLD STYLES (TO BE CLEANED UP)
   ============================================ */

/* ============================================
   PWA INSTALL PROMPT
   ============================================ */

.pwa-install-prompt {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.pwa-prompt-content {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    max-width: 400px;
}

.pwa-prompt-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.pwa-prompt-text {
    flex: 1;
}

.pwa-prompt-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.pwa-prompt-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.pwa-prompt-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-prompt-cancel {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.pwa-prompt-cancel:hover {
    background: var(--bg-tertiary);
}

.pwa-prompt-install {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.pwa-prompt-install:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   UPDATE BUTTON
   ============================================ */

.update-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.update-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.update-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.update-btn.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-subtle: rgba(255, 255, 255, 0.3);
        --border-medium: rgba(255, 255, 255, 0.5);
        --text-secondary: #d0d0d0;
    }
}

/* Animations disabled for accessibility */
.animations-disabled *,
.animations-disabled *::before,
.animations-disabled *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* ============================================
   ENHANCED ANIMATIONS
   ============================================ */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success animation */
.success-checkmark {
    animation: scaleIn 0.5s ease;
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

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

/* Selection color */
::selection {
    background: var(--accent-primary);
    color: white;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

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

/* ============================================
   ADMIN DASHBOARD
   ============================================ */

.admin-content {
    max-width: 1400px;
    padding: 0;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-shiny);
    overflow: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
}

.admin-header-left h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.admin-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-badge {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-dashboard {
    display: flex;
    min-height: 600px;
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-subtle);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-user-info {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-glass-light);
    border-radius: var(--radius-xl);
    border: var(--glass-border);
}

.admin-avatar {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.admin-email {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.admin-role {
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-quick-btn {
    background: var(--bg-glass-light);
    border: var(--glass-border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: left;
}

.admin-quick-btn:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
    border-color: var(--border-shiny);
}

.admin-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.admin-tab {
    padding: 0.75rem 1.5rem;
    background: var(--bg-glass-light);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.admin-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.admin-tab-content {
    display: block;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    position: relative;
    overflow: hidden;
}

.admin-stat-card.large {
    grid-column: span 2;
}

.admin-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.admin-stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.admin-stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.admin-stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-stat-change {
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.admin-activity-log {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.admin-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.activity-icon {
    font-size: 1.25rem;
}

.activity-text {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.admin-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-search {
    flex: 1;
    min-width: 200px;
}

.admin-search-input {
    width: 100%;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.admin-filters {
    display: flex;
    gap: 0.5rem;
}

.admin-filter-select {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.admin-table-container {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--bg-tertiary);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.admin-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-action-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.admin-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.admin-action-btn.danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.inactive {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.analytics-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-glass-light);
    border-radius: var(--radius-xl);
    border: var(--glass-border);
}

.analytics-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.analytics-placeholder h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.analytics-placeholder p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.analytics-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.analytics-metric {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

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

.metric-chart {
    font-size: 2rem;
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 1rem;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-glass-light);
}

.nav-item.active {
    color: var(--accent-primary);
}

.nav-item.active::before {
    width: 100%;
}

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

.nav-label {
    font-size: 0.6875rem;
    font-weight: 500;
}

/* ============================================
   ADMIN PAGINATION
   ============================================ */

.admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-top: var(--border-subtle);
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-tertiary);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   TEMPLATES SCREEN
   ============================================ */

.templates-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.25rem;
}

.template-card {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
}

.template-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.template-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.template-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

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

/* ============================================
   PROFILE SCREEN
   ============================================ */

.profile-container {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-info {
    text-align: center;
    padding: 2rem;
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.profile-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.profile-info p {
    color: var(--text-secondary);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.profile-stat {
    background: var(--bg-glass-light);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md), var(--shadow-shiny);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
}

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