/* ===== CSS VARIABLES ===== */
        :root {
            --bg-main: #0a0c16;      
            --bg-secondary: #0e101d; 
            --bg-card: #121420;      
            --bg-card-hover: #191b2a;
            --bg-input: #151724;
            --border-color: #1e1f2a;
            --border-light: #2a2b38;
            
            --text-main: #ffffff;
            --text-secondary: #9ca3af;
            --text-muted: #6b7280;
            
            --brand-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
            --brand-gradient-hover: linear-gradient(135deg, #9d6fff 0%, #4f90ff 100%);
            --brand-purple: #8b5cf6;
            --brand-blue: #3b82f6;
            
            --color-calm: #3b82f6;
            --color-joy: #10b981;
            --color-stress: #f97316;
            --color-harmony: #a855f7;
            --color-anxiety: #ef4444;
            
            --color-success: #10b981;
            --color-danger: #ef4444;
            
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 20px;
            --radius-full: 9999px;
            
            --transition: all 0.2s ease;
            --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--bg-main);
            color: var(--text-main);
            line-height: 1.5;
            min-height: 100vh;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
        }

        /* ===== UTILITY CLASSES ===== */
        .container {
            width: 100%;
            max-width: 720px;
            margin: 0 auto;
            padding: 0 16px;
        }

        .screen {
            display: none;
            min-height: 100vh;
            animation: fadeIn 0.3s ease;
        }

        .screen.active {
            display: flex;
            flex-direction: column;
        }

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

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

        @keyframes wave {
            0%, 100% { height: 8px; }
            50% { height: 100%; }
        }

        /* ===== TYPOGRAPHY ===== */
        h1 {
            font-size: 32px;
            font-weight: 700;
            line-height: 1.2;
        }

        h2 {
            font-size: 24px;
            font-weight: 600;
        }

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

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

        /* ===== BUTTONS ===== */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 28px;
            border-radius: var(--radius-full);
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            border: none;
            text-decoration: none;
            white-space: nowrap;
        }

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

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

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

        .btn-secondary:hover {
            background: var(--bg-card-hover);
            border-color: var(--border-light);
        }

        .btn-ghost {
            background: transparent;
            color: var(--text-secondary);
            padding: 10px 16px;
        }

        .btn-ghost:hover {
            color: var(--text-main);
        }

        .btn-full {
            width: 100%;
        }

        .btn-icon {
            width: 40px;
            height: 40px;
            padding: 0;
            border-radius: var(--radius-md);
        }

        /* ===== HEADER ===== */
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .header-simple {
            justify-content: center;
            position: relative;
        }

        .header-back {
            position: absolute;
            left: 0;
            background: none;
            border: none;
            color: var(--text-main);
            cursor: pointer;
            padding: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .header-actions {
            display: flex;
            gap: 8px;
            position: absolute;
            right: 0;
        }

        .header-action-btn {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
        }

        .header-action-btn:hover {
            color: var(--text-main);
        }

        .header-action-btn.danger:hover {
            color: var(--color-danger);
        }

        .header-title {
            font-size: 15px;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 700;
            font-size: 18px;
            cursor: pointer;
            text-decoration: none;
            color: var(--text-main);
        }

        .logo-icon {
            width: 36px;
            height: 36px;
            background: var(--brand-gradient);
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nav-icons {
            display: flex;
            gap: 8px;
        }

        .nav-icon-btn {
            width: 40px;
            height: 40px;
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-md);
            transition: var(--transition);
        }

        .nav-icon-btn:hover {
            color: var(--text-main);
            background: var(--bg-card);
        }

        /* ===== CARDS ===== */
        .card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 20px;
        }

        .card-gradient {
            background: var(--brand-gradient);
            padding: 1px;
            border-radius: var(--radius-xl);
        }

        .card-gradient-inner {
            background: var(--bg-card);
            border-radius: calc(var(--radius-xl) - 1px);
            padding: 32px 24px;
        }

        /* ===== INPUTS ===== */
        .input-group {
            margin-bottom: 20px;
        }

        .input-group label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-main);
            margin-bottom: 8px;
        }

        .input-wrapper {
            position: relative;
        }

        .input-wrapper input {
            width: 100%;
            padding: 14px 16px;
            padding-right: 48px;
            background: var(--bg-input);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            color: var(--text-main);
            font-size: 15px;
            outline: none;
            transition: var(--transition);
        }

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

        .input-wrapper input:focus {
            border-color: var(--brand-purple);
        }

        .input-toggle {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* ===== TABS ===== */
        .tabs {
            display: flex;
            background: var(--bg-input);
            border-radius: var(--radius-full);
            padding: 4px;
            margin-bottom: 24px;
        }

        .tab {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 16px;
            border-radius: var(--radius-full);
            font-size: 14px;
            font-weight: 600;
            color: var(--text-secondary);
            cursor: pointer;
            transition: var(--transition);
            border: none;
            background: transparent;
        }

        .tab.active {
            background: var(--brand-gradient);
            color: white;
        }

        .tab:not(.active):hover {
            color: var(--text-main);
        }

        /* ===== MOOD TAGS ===== */
        .mood-tag {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            border-radius: var(--radius-full);
            font-size: 12px;
            font-weight: 500;
        }

        .tag-calm {
            background: rgba(59, 130, 246, 0.15);
            color: var(--color-calm);
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        .tag-anxiety {
            background: rgba(249, 115, 22, 0.15);
            color: var(--color-stress);
            border: 1px solid rgba(249, 115, 22, 0.3);
        }

        .tag-joy {
            background: rgba(16, 185, 129, 0.15);
            color: var(--color-joy);
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .tag-harmony {
            background: rgba(168, 85, 247, 0.15);
            color: var(--color-harmony);
            border: 1px solid rgba(168, 85, 247, 0.3);
        }

        /* ===== PROGRESS BAR ===== */
        .progress-item {
            margin-bottom: 16px;
        }

        .progress-header {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            margin-bottom: 8px;
        }

        .progress-label {
            color: var(--text-main);
        }

        .progress-value {
            color: var(--text-secondary);
        }

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

        .progress-fill {
            height: 100%;
            border-radius: var(--radius-full);
            transition: width 0.5s ease;
        }

        /* ===== LANDING PAGE ===== */
        #landing-screen {
            padding-bottom: 60px;
        }

        .landing-hero {
            text-align: center;
            padding: 60px 0 40px;
        }

        .landing-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: rgba(139, 92, 246, 0.1);
            border: 1px solid rgba(139, 92, 246, 0.2);
            padding: 8px 16px;
            border-radius: var(--radius-full);
            font-size: 13px;
            color: var(--brand-purple);
            margin-bottom: 32px;
        }

        .landing-title {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 20px;
            line-height: 1.2;
        }

        .landing-subtitle {
            font-size: 16px;
            color: var(--text-secondary);
            max-width: 480px;
            margin: 0 auto 32px;
            line-height: 1.6;
        }

        .landing-buttons {
            display: flex;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-top: 48px;
        }

        .feature-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 24px;
            transition: var(--transition);
        }

        .feature-card:hover {
            border-color: var(--border-light);
            transform: translateY(-2px);
        }

        .feature-icon {
            width: 48px;
            height: 48px;
            background: rgba(139, 92, 246, 0.1);
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
        }

        .feature-icon svg {
            width: 24px;
            height: 24px;
            color: var(--brand-purple);
        }

        .feature-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .feature-desc {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .support-card {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: var(--radius-xl);
            padding: 40px 24px;
            text-align: center;
            margin-top: 24px;
        }

        .support-icon {
            width: 56px;
            height: 56px;
            background: var(--brand-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
        }

        .support-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .support-desc {
            font-size: 14px;
            color: var(--text-secondary);
            max-width: 400px;
            margin: 0 auto;
        }

        /* ===== AUTH SCREENS ===== */
        .auth-screen {
            justify-content: center;
            align-items: center;
            padding: 40px 16px;
        }

        .auth-logo {
            text-align: center;
            margin-bottom: 32px;
        }

        .auth-logo .logo-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 12px;
        }

        .auth-box {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-xl);
            padding: 32px 24px;
            width: 100%;
            max-width: 400px;
        }

        .auth-link {
            color: var(--brand-purple);
            text-decoration: none;
            font-size: 14px;
            font-weight: 600;
        }

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

        .secure-badge {
            display: flex;
            gap: 12px;
            align-items: flex-start;
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.2);
            padding: 16px;
            border-radius: var(--radius-md);
            margin-top: 24px;
        }

        .secure-badge svg {
            flex-shrink: 0;
            color: var(--color-success);
        }

        .secure-badge p {
            font-size: 13px;
            color: var(--color-success);
            line-height: 1.5;
        }

        .auth-footer {
            margin-top: 24px;
            text-align: center;
        }

        .auth-footer a {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 14px;
        }

        .auth-footer a:hover {
            color: var(--text-main);
        }

        /* ===== DASHBOARD ===== */
        #dashboard-screen {
            padding-bottom: 40px;
        }

        .dashboard-welcome {
            padding: 24px 0;
        }

        .dashboard-welcome h2 {
            font-size: 20px;
            margin-bottom: 4px;
        }

        .dashboard-welcome p {
            color: var(--text-secondary);
            font-size: 14px;
        }

        .record-banner {
            background: var(--brand-gradient);
            padding: 2px;
            border-radius: var(--radius-xl);
            margin-bottom: 24px;
            cursor: pointer;
            transition: var(--transition);
        }

        .record-banner:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-glow);
        }

        .record-banner-inner {
            background: var(--bg-card);
            border-radius: calc(var(--radius-xl) - 2px);
            padding: 48px 24px;
            text-align: center;
        }

        .mic-button {
            width: 80px;
            height: 80px;
            background: var(--brand-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
            transition: var(--transition);
        }

        .record-banner:hover .mic-button {
            transform: scale(1.05);
        }

        .record-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .record-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
        }

        .stats-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin-bottom: 32px;
        }

        .stat-box {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 20px;
            text-align: center;
        }

        .stat-number {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 4px;
        }

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

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

        .section-title {
            font-size: 16px;
            font-weight: 600;
        }

        .section-link {
            color: var(--brand-purple);
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
        }

        .history-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .history-item {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 16px;
            cursor: pointer;
            transition: var(--transition);
        }

        .history-item:hover {
            border-color: var(--border-light);
        }

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

        .history-meta {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .history-date {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 14px;
            color: var(--text-main);
        }

        .history-time {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .history-preview {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.5;
            margin-top: 8px;
        }

        /* ===== RECORDING SCREEN ===== */
        #recording-screen {
            background: var(--bg-main);
        }

        .recording-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 16px;
        }

        .recording-timer {
            font-size: 64px;
            font-weight: 300;
            margin-bottom: 48px;
            font-variant-numeric: tabular-nums;
        }

        .waveform {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3px;
            height: 60px;
            margin-bottom: 48px;
        }

        .wave-bar {
            width: 4px;
            background: var(--brand-gradient);
            border-radius: 2px;
            animation: wave 0.8s ease-in-out infinite;
        }

        .stop-button {
            width: 72px;
            height: 72px;
            background: var(--color-danger);
            border-radius: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            margin-bottom: 16px;
            box-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
            transition: var(--transition);
            border: none;
        }

        .stop-button:hover {
            transform: scale(1.05);
        }

        .stop-hint {
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 32px;
        }

        @keyframes musicPulse {
            0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5); }
            70% { box-shadow: 0 0 0 15px rgba(139, 92, 246, 0); }
           100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
        }

        .music-button.playing {
            background: var(--brand-gradient);
            border-color: transparent;
            color: white;
            animation: musicPulse 2s infinite; 
            transform: scale(1.05); 
        }

        .music-button {
            display: flex;
            align-items: center;
            gap: 8px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-full);
            padding: 12px 20px;
            font-size: 14px;
            color: var(--text-main);
            cursor: pointer;
            transition: var(--transition);
        }

        .music-button:hover {
            border-color: var(--border-light);
            background: var(--bg-card-hover);
        }

        .recording-footer {
            padding: 20px 16px;
            border-top: 1px solid var(--border-color);
        }

        .recording-actions {
            display: flex;
            gap: 12px;
            max-width: 480px;
            margin: 0 auto;
        }

        .recording-actions .btn {
            flex: 1;
            border-radius: var(--radius-md);
        }

        /* ===== ANALYTICS SCREEN ===== */
        #analytics-screen {
            padding-bottom: 40px;
        }

        .analytics-date {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 16px 0;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .analytics-date span {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .mood-art {
            width: 100%;
            aspect-ratio: 1;
            background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.4) 0%, rgba(59, 130, 246, 0.2) 40%, transparent 70%),
                        var(--bg-card);
            border-radius: var(--radius-xl);
            position: relative;
            overflow: hidden;
            margin-bottom: 24px;
        }

        .mood-art-badge {
            position: absolute;
            bottom: 16px;
            right: 16px;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(10px);
            padding: 8px 16px;
            border-radius: var(--radius-full);
            font-size: 12px;
            color: var(--text-secondary);
        }

        .transcription-section {
            margin-bottom: 32px;
        }

        .transcription-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 20px;
            font-size: 15px;
            color: var(--text-secondary);
            line-height: 1.7;
        }

        .emotions-section {
            margin-bottom: 32px;
        }

        .reflection-section {
            margin-bottom: 32px;
        }

        .reflection-card {
            background: rgba(139, 92, 246, 0.05);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: var(--radius-lg);
            padding: 20px;
        }

        .reflection-text {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 16px;
        }

        .reflection-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        /* ===== SUPPORT SCREEN ===== */
        #support-screen {
            padding-bottom: 40px;
        }

        .support-banner-card {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: var(--radius-lg);
            padding: 20px;
            display: flex;
            gap: 16px;
            margin: 24px 0;
        }

        .support-banner-icon {
            width: 40px;
            height: 40px;
            background: rgba(139, 92, 246, 0.2);
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .support-banner-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .support-banner-desc {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        .search-card {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: var(--radius-xl);
            padding: 48px 24px;
            text-align: center;
            margin-bottom: 24px;
        }

        .search-card:hover {
            border-color: var(--brand-purple);
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
        }

        .search-icon {
            width: 64px;
            height: 64px;
            background: var(--brand-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 20px;
            box-shadow: var(--shadow-glow);
        }

        .search-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .search-desc {
            font-size: 14px;
            color: var(--text-secondary);
        }

        .searching-status {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-full);
            padding: 12px 20px;
            font-size: 14px;
            color: var(--text-main);
            margin-bottom: 24px;
        }

        .searching-dot {
            width: 8px;
            height: 8px;
            background: var(--brand-purple);
            border-radius: 50%;
            animation: pulse 1.5s ease-in-out infinite;
        }

        .matches-section {
            margin-bottom: 24px;
        }

        .match-item {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 16px;
            margin-bottom: 12px;
        }

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

        .match-status {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .match-status.online .status-dot {
            background: var(--color-success);
        }

        .match-status.offline .status-dot {
            background: var(--text-muted);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .match-percent {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 14px;
            color: var(--brand-purple);
        }

        .match-title {
            font-size: 15px;
            font-weight: 500;
            margin-bottom: 12px;
        }

        .match-button {
            width: 100%;
        }

        .rules-card {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            padding: 20px;
        }

        .rules-title {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 12px;
        }

        .rules-list {
            list-style: none;
            padding: 0;
        }

        .rules-list li {
            font-size: 13px;
            color: var(--text-secondary);
            padding: 8px 0;
            padding-left: 20px;
            position: relative;
        }

        .rules-list li::before {
            content: "•";
            position: absolute;
            left: 0;
            color: var(--text-muted);
        }

        /* --- СТИЛІ ДЛЯ КАСТОМНИХ СПОВІЩЕНЬ --- */
        #notification-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .custom-toast {
            background-color: #2a2a35; /* Темний фон під дизайн */
            color: white;
            padding: 16px 24px;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            font-size: 14px;
            font-weight: 500;
            transform: translateX(120%);
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
            border-left: 4px solid #8b5cf6; /* Фіолетова лінія */
        }
        
        .custom-toast.show {
            transform: translateX(0);
            opacity: 1;
        }
        
        .custom-toast.error {
            border-left-color: #ef4444; /* Червоний для помилок */
        }
        
        .custom-toast.success {
            border-left-color: #22c55e; /* Зелений для успіху */
        }

        /* --- СТАН ЗАВАНТАЖЕННЯ ДЛЯ КНОПОК --- */
        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            pointer-events: none;
            background: #555; /* Робимо її сірішою під час очікування */
        }

        /* --- КАСТОМНИЙ АУДІОПЛЕЄР --- */
        .sleek-player {
            display: flex;
            align-items: center;
            gap: 12px;
            background: #2a2a35; /* Колір карток MoodVoice */
            padding: 12px 16px;
            border-radius: 12px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }
        
        .sleek-play-btn {
            background: #8b5cf6; /* Фіолетовий акцент */
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: transform 0.2s;
        }
        
        .sleek-play-btn:hover {
            transform: scale(1.05);
        }
        
        .sleek-progress-bg {
            flex-grow: 1;
            height: 6px;
            background: #3f3f4e; /* Темна полоса */
            border-radius: 3px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        
        .sleek-progress-fill {
            height: 100%;
            width: 0%;
            background: #8b5cf6; /* Заповнення фіолетовим */
            border-radius: 3px;
            transition: width 0.1s linear;
        }
        
        .sleek-time {
            font-size: 12px;
            color: #9ca3af;
            min-width: 75px;
            text-align: right;
            font-weight: 500;
        }

        /* --- КАСТОМНЕ ВІКНО ПІДТВЕРДЖЕННЯ --- */
        .confirm-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }
        
        .confirm-overlay.show {
            opacity: 1;
            pointer-events: auto;
        }
        
        .confirm-box {
            background: #2a2a35; /* Колір карток MoodVoice */
            border-radius: 16px;
            padding: 24px;
            width: 90%;
            max-width: 320px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            transform: translateY(20px) scale(0.95);
            transition: all 0.3s ease;
        }
        
        .confirm-overlay.show .confirm-box {
            transform: translateY(0) scale(1);
        }
        
        .confirm-icon {
            width: 56px;
            height: 56px;
            background: rgba(239, 68, 68, 0.1); /* Прозорий червоний */
            color: var(--color-danger);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
        }
        
        .confirm-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
            color: white;
        }
        
        .confirm-text {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 24px;
            line-height: 1.5;
        }
        
        .confirm-actions {
            display: flex;
            gap: 12px;
        }
        
        .confirm-actions .btn {
            flex: 1;
            padding: 12px;
            font-size: 14px;
        }

        /* ===== RESPONSIVE ===== */
        @media (min-width: 768px) {
            .container {
                padding: 0 24px;
            }

            .landing-title {
                font-size: 48px;
            }

            .landing-subtitle {
                font-size: 18px;
            }

            .features-grid {
                grid-template-columns: repeat(3, 1fr);
            }

            .recording-timer {
                font-size: 80px;
            }

            .mood-art {
                max-width: 500px;
                margin-left: auto;
                margin-right: auto;
            }
        }

        @media (max-width: 480px) {
            .landing-title {
                font-size: 28px;
            }

            .landing-buttons {
                flex-direction: column;
                align-items: center;
            }

            .landing-buttons .btn {
                width: 100%;
                max-width: 280px;
            }

            .stats-row {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }

            .stat-box {
                padding: 16px 8px;
            }

            .stat-number {
                font-size: 24px;
            }

            .recording-timer {
                font-size: 48px;
            }

            .tabs {
                flex-wrap: nowrap;
            }

            .tab {
                padding: 10px 12px;
                font-size: 13px;
            }
        }

        /* ===== ICONS ===== */
        .icon {
            width: 24px;
            height: 24px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .icon-sm {
            width: 20px;
            height: 20px;
        }

        .icon-lg {
            width: 32px;
            height: 32px;
        }

        /* ===== CRISIS BANNER & ML METADATA ===== */
        .crisis-banner {
            background: rgba(239, 68, 68, 0.12);
            border: 1px solid rgba(239, 68, 68, 0.45);
            border-radius: var(--radius-lg);
            padding: 18px 20px;
            margin-bottom: 20px;
        }

        .crisis-banner-header {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #fca5a5;
            margin-bottom: 8px;
        }

        .crisis-banner-header h4 {
            font-size: 16px;
            font-weight: 600;
        }

        .crisis-banner-text {
            font-size: 14px;
            color: #fecaca;
            line-height: 1.5;
            margin-bottom: 12px;
        }

        .crisis-hotlines {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-size: 13px;
            color: #ffffff;
            background: rgba(0, 0, 0, 0.25);
            padding: 10px 12px;
            border-radius: var(--radius-sm);
        }

        .confidence-badge {
            font-size: 12px;
            color: var(--text-secondary);
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            padding: 4px 10px;
            border-radius: var(--radius-full);
        }

        .low-confidence-note {
            font-size: 13px;
            color: #fbbf24;
            background: rgba(251, 191, 36, 0.1);
            border: 1px solid rgba(251, 191, 36, 0.25);
            border-radius: var(--radius-md);
            padding: 10px 14px;
            margin-bottom: 16px;
        }

        .tag-sadness {
            background: rgba(168, 85, 247, 0.15);
            color: var(--color-harmony);
            border: 1px solid rgba(168, 85, 247, 0.3);
        }

        .tag-crisis {
            background: rgba(239, 68, 68, 0.18);
            color: #fca5a5;
            border: 1px solid rgba(239, 68, 68, 0.45);
        }

        .mood-art-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            z-index: 1;
        }

        .mood-art-badge {
            z-index: 2;
            color: #f3f4f6;
            border: 1px solid rgba(255, 255, 255, 0.12);
        }

        /* ===== ГРАФІК ДИНАМІКИ ТА ФІЛЬТРИ ІСТОРІЇ ===== */
        .chart-card {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 18px;
            margin-bottom: 24px;
        }

        .chart-subtitle {
            font-size: 12px;
            color: var(--text-secondary);
        }

        .chart-wrapper {
            position: relative;
            height: 220px;
            width: 100%;
        }

        .chart-empty-msg {
            text-align: center;
            color: var(--text-secondary);
            font-size: 14px;
            padding: 24px 10px;
        }

        .history-filters {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 16px;
        }

        .filter-search-input {
            width: 100%;
            padding: 11px 14px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: var(--bg-card);
            color: var(--text-primary, #fff);
            font-size: 14px;
            outline: none;
            box-sizing: border-box;
        }

        .filter-search-input:focus {
            border-color: var(--brand-purple, #8b5cf6);
        }

        .filter-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .filter-chip {
            padding: 6px 14px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .filter-chip:hover {
            border-color: rgba(168, 85, 247, 0.5);
            color: #fff;
        }

        .filter-chip.active {
            background: var(--brand-gradient);
            border-color: transparent;
            color: #fff;
            font-weight: 600;
        }

        /* ===== ПРОФІЛЬ ТА DANGER ZONE ===== */
        .profile-card {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 16px;
            padding: 18px;
            margin-bottom: 18px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .profile-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        }

        .profile-row:last-child {
            padding-bottom: 0;
            border-bottom: none;
        }

        .profile-label {
            color: var(--text-secondary);
            font-size: 14px;
        }

        .role-badge {
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            background: rgba(139, 92, 246, 0.18);
            color: #c4b5fd;
        }

        .role-badge.admin {
            background: rgba(249, 115, 22, 0.2);
            color: #fdba74;
        }

        .profile-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 24px;
        }

        .danger-zone-card {
            background: rgba(239, 68, 68, 0.07);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 16px;
            padding: 18px;
        }

        .danger-zone-title {
            color: #fca5a5;
            margin: 0 0 8px 0;
            font-size: 16px;
        }

        .danger-zone-desc {
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.5;
            margin: 0 0 16px 0;
        }

        .btn-danger-outline {
            background: rgba(239, 68, 68, 0.15);
            border: 1px solid rgba(239, 68, 68, 0.5);
            color: #fca5a5;
        }

        .btn-danger-outline:hover {
            background: var(--color-danger, #ef4444);
            color: #fff;
        }

        /* ===== АДМІН-ПАНЕЛЬ ===== */
        .admin-metrics-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }

        @media (min-width: 600px) {
            .admin-metrics-grid {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        .admin-users-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 24px;
        }

        .admin-user-card {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 14px;
            padding: 14px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .admin-user-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .admin-user-email {
            font-weight: 600;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .admin-user-meta {
            font-size: 12px;
            color: var(--text-secondary);
        }

        .status-badge-blocked {
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 11px;
            background: rgba(239, 68, 68, 0.2);
            color: #fca5a5;
        }

        .admin-block-btn {
            padding: 8px 14px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(255, 255, 255, 0.06);
            color: #fff;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .admin-block-btn.block {
            border-color: rgba(239, 68, 68, 0.45);
            color: #fca5a5;
        }

        .admin-block-btn.block:hover {
            background: var(--color-danger, #ef4444);
            color: #fff;
        }

        .admin-block-btn.unblock {
            border-color: rgba(16, 185, 129, 0.45);
            color: #6ee7b7;
        }

        .admin-block-btn.unblock:hover {
            background: #10b981;
            color: #fff;
        }

        /* ===== ЗГОДА, ДИСКЛЕЙМЕР ТА ПАУЗА ЗАПИСУ ===== */
        .consent-label {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.45;
            margin-bottom: 18px;
            cursor: pointer;
        }

        .consent-label input[type="checkbox"] {
            margin-top: 3px;
            width: 16px;
            height: 16px;
            accent-color: var(--brand-purple);
            flex-shrink: 0;
        }

            .recording-controls {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
        }

        .recording-controls .stop-button {
            margin-bottom: 0;
            position: relative;
            z-index: 2;
        }

        .pause-button {
            width: 56px;
            height: 56px;
            margin-right: 16px;
            border-radius: 50%;
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            overflow: hidden;
            opacity: 1;
            transform: scale(1) translateX(0);
            transition:
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s ease,
                background 0.2s ease;
        }

        .pause-button.hidden {
            width: 0;
            margin-right: 0;
            border-width: 0;
            opacity: 0;
            transform: scale(0.5) translateX(24px);
            pointer-events: none;
        }

        .pause-button:hover {
            border-color: var(--brand-purple);
            background: var(--bg-card-hover);
        }

        .waveform.paused .wave-bar {
            animation-play-state: paused;
            opacity: 0.45;
        }

        .medical-disclaimer {
            font-size: 13px;
            color: var(--text-secondary);
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-md);
            padding: 12px 14px;
            margin-bottom: 24px;
            line-height: 1.5;
        }

        .landing-disclaimer {
            text-align: center;
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 28px;
            line-height: 1.5;
        }

        .tag-pending {
            background: rgba(251, 191, 36, 0.15);
            color: #fbbf24;
            border: 1px solid rgba(251, 191, 36, 0.35);
        }

        .tag-failed {
            background: rgba(239, 68, 68, 0.15);
            color: #fca5a5;
            border: 1px solid rgba(239, 68, 68, 0.4);
        }

        .retry-btn {
            margin-top: 12px;
            padding: 8px 14px;
            border-radius: var(--radius-md);
            border: 1px solid rgba(139, 92, 246, 0.5);
            background: rgba(139, 92, 246, 0.15);
            color: #c4b5fd;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
        }

        .retry-btn:hover {
            background: var(--brand-purple);
            color: #fff;
        }

        /* ===== КАЛЕНДАР НАСТРОЮ ===== */
        .calendar-nav {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .calendar-month-label {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            min-width: 115px;
            text-align: center;
            text-transform: capitalize;
        }

        .calendar-nav-btn {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            border: 1px solid var(--border-light);
            background: var(--bg-input);
            color: var(--text-main);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
        }

        .calendar-nav-btn:hover {
            border-color: var(--brand-purple);
            background: var(--bg-card-hover);
        }

        .calendar-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            text-align: center;
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 8px;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 6px;
        }

        .calendar-day {
            aspect-ratio: 1;
            max-height: 44px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            color: var(--text-secondary);
            position: relative;
            transition: var(--transition);
        }

        .calendar-day.empty {
            background: transparent;
            border-color: transparent;
        }

        .calendar-day.today {
            border-color: rgba(255, 255, 255, 0.35);
            color: #fff;
            font-weight: 600;
        }

        .calendar-day.has-record {
            cursor: pointer;
            color: #fff;
            font-weight: 600;
        }

        .calendar-day.has-record:hover {
            transform: scale(1.06);
        }

        .calendar-day.mood-calm { background: rgba(59, 130, 246, 0.35); border-color: rgba(59, 130, 246, 0.6); }
        .calendar-day.mood-joy { background: rgba(16, 185, 129, 0.35); border-color: rgba(16, 185, 129, 0.6); }
        .calendar-day.mood-sadness { background: rgba(168, 85, 247, 0.35); border-color: rgba(168, 85, 247, 0.6); }
        .calendar-day.mood-stress { background: rgba(249, 115, 22, 0.35); border-color: rgba(249, 115, 22, 0.6); }
        .calendar-day.mood-crisis { background: rgba(239, 68, 68, 0.4); border-color: rgba(239, 68, 68, 0.75); }

        .calendar-legend {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 14px;
            margin-top: 14px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .calendar-legend span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            display: inline-block;
        }

        .legend-dot.calm { background: var(--color-calm); }
        .legend-dot.joy { background: var(--color-joy); }
        .legend-dot.sadness { background: var(--color-harmony); }
        .legend-dot.stress { background: var(--color-stress); }