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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #000000;
    --bg-card: #000000;
    --bg-card-hover: #111111;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

@media (min-width: 1024px) {
    .container {
        padding: 2rem 3rem;
    }
}

/* Wide screen layout */
.main-content {
    display: block;
    max-width: 800px;
    margin: 0 auto;
}

.results-column {
    display: none;
}

.results-column:has(.results-section:not(.hidden)) {
    display: block;
}

/* When results are visible, expand to two columns */
.main-content:has(.results-section:not(.hidden)) {
    max-width: none;
}

@media (min-width: 1024px) {
    .main-content:has(.results-section:not(.hidden)) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }

    .recording-column {
        position: sticky;
        top: 2rem;
    }

    .results-column {
        display: block;
    }
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-logo {
    height: 70px;
    width: auto;
    animation: logoPulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .header-logo {
        height: 40px;
    }
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

section {
    margin-bottom: 2rem;
}

section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.passage-card {
    background: #000000;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 500;
}

.subcategory-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.subcategory-filters.hidden {
    display: none;
}

.subcategory-btn {
    background: transparent;
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.subcategory-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
}

.subcategory-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
    font-weight: 500;
}

#passage-text {
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-new-passage {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-new-passage:hover {
    color: var(--primary);
    background: #000000;
    border-color: var(--primary);
}

.btn-new-passage .lucide-icon {
    width: 14px;
    height: 14px;
}

.passage-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.recording-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.recording-controls .status {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.recording-controls .btn-record {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.recording-controls .btn-record:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.4);
}

.custom-passage-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.7;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

.custom-passage-input:focus {
    outline: none;
    border-color: var(--primary);
}

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

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

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.danger {
    color: #ef4444;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

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

.btn-record {
    background: var(--primary);
    color: white;
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 50px;
    min-width: 220px;
}

.btn-record:hover:not(.disabled):not(.recording) {
    background: var(--primary-dark);
    transform: scale(1.02);
}

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

.btn-record.recording,
.recording-controls .btn-record.recording {
    background: var(--danger) !important;
    animation: pulse 1.5s infinite;
}

.record-icon {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    display: inline-block;
}

.btn-record.recording .record-icon {
    animation: blink 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.status {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.results-section {
    animation: fadeIn 0.5s ease;
}

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

.transcription-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.transcription-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#transcription {
    font-size: 1rem;
    color: var(--text);
    font-style: italic;
}

.btn-playback {
    margin-top: 1rem;
    background: var(--bg-card-hover);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
}

.btn-playback:hover {
    background: var(--primary);
}

.btn-playback.playing {
    background: var(--primary);
}

.play-icon {
    font-size: 0.8rem;
}

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

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

@media (max-width: 500px) {
    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .score-card {
        padding: 0.875rem;
    }

    .score-label {
        font-size: 0.7rem;
    }

    .score-value {
        font-size: 1.5rem;
    }
}

.score-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    position: relative;
}

.score-delta {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.score-delta.positive {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.score-delta.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.score-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.score-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.precise-metrics-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.precise-metrics-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.precise-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .precise-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.precise-metric {
    text-align: center;
    padding: 1rem;
    background: var(--border);
    border-radius: 8px;
}

.precise-metric-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.precise-metric-value.good {
    color: #22c55e;
}

.precise-metric-value.warning {
    color: #f59e0b;
}

.precise-metric-value.bad {
    color: #ef4444;
}

.precise-metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.precise-metric-note {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

.overall-score-card {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.overall-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.overall-value {
    font-size: 4rem;
    font-weight: 700;
}

.feedback-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.feedback-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#feedback {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.7;
    white-space: pre-line;
}

.tips-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.tips-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#tips-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

#tips-list li:last-child {
    border-bottom: none;
}

#tips-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.confidence-tips-card {
    border-color: #22c55e;
}

.confidence-tips-card h3 {
    color: #22c55e;
}

#confidence-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#confidence-tips-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

#confidence-tips-list li:last-child {
    border-bottom: none;
}

#confidence-tips-list li::before {
    content: "💪";
    position: absolute;
    left: 0;
}

.history-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.history-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

#history-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.averages-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .averages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .averages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.average-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid var(--border);
}

.average-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.average-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.improvement-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.improvement-section h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    text-align: center;
}

.improvement-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .improvement-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .improvement-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.improvement-card {
    text-align: center;
    padding: 0.5rem;
}

.improvement-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.improvement-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

.improvement-value.positive {
    color: #22c55e;
}

.improvement-value.negative {
    color: #ef4444;
}

.improvement-value.neutral {
    color: var(--text-muted);
}

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

@media (min-width: 1024px) {
    .history-charts {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .history-charts {
        grid-template-columns: 1fr;
    }
}

.history-chart-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.history-chart-card h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-chart-card canvas {
    width: 100% !important;
    height: 120px !important;
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.9);
    z-index: 1000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Voice Exercises Styles */
.exercises-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.exercises-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.exercises-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.exercises-header-left {
    flex: 1;
}

.exercises-header h2 {
    margin-bottom: 0.25rem;
    color: white;
    font-size: 1.3rem;
}

.exercises-subtitle {
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    font-size: 0.95rem;
}

.exercises-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.2s;
}

.exercises-header:hover .exercises-toggle {
    background: rgba(255, 255, 255, 0.3);
}

.exercises-toggle.open {
    transform: rotate(180deg);
}

.toggle-icon {
    color: white;
    font-size: 1.2rem;
}

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

.exercise-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
}

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

.exercise-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.exercise-card h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.exercise-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.exercise-steps {
    padding-left: 1.25rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.8;
}

.exercise-steps li {
    margin-bottom: 0.25rem;
}

.exercise-steps li::marker {
    color: var(--primary);
}

.btn-exercise {
    width: 100%;
    margin-top: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-exercise:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.btn-exercise.active {
    background: var(--danger);
}

/* Breathing Exercise */
.breathing-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.breathing-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--success));
    margin: 0 auto 1rem;
    transform: scale(0.6);
    transition: transform 4s ease-in-out;
}

.breathing-circle.inhale {
    transform: scale(1.3);
}

.breathing-circle.exhale {
    transform: scale(0.6);
    transition: transform 6s ease-in-out;
}

.breathing-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.breathing-count {
    color: var(--text-muted);
}

/* Timer Exercise */
.timer-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.timer-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.timer-seconds {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.timer-instruction {
    color: var(--text);
    font-weight: 500;
}

/* Tongue Twister */
.twister-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.twister-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.twister-count {
    color: var(--text-muted);
}

/* Projection Exercise */
.projection-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.projection-number {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.volume-bar {
    height: 20px;
    background: var(--surface);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--warning), var(--danger));
    width: 10%;
    transition: width 0.3s;
    border-radius: 10px;
}

.projection-instruction {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Siren Exercise */
.siren-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.siren-wave {
    height: 80px;
    background: linear-gradient(180deg, var(--primary) 0%, transparent 50%, var(--primary) 100%);
    border-radius: 8px;
    position: relative;
    margin-bottom: 1rem;
    overflow: hidden;
}

.siren-dot {
    width: 20px;
    height: 20px;
    background: var(--success);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50%;
    box-shadow: 0 0 20px var(--success);
}

.siren-dot.going-up {
    animation: sirenUp 3s ease-in-out forwards;
}

.siren-dot.going-down {
    animation: sirenDown 3s ease-in-out forwards;
}

@keyframes sirenUp {
    from { top: calc(100% - 30px); }
    to { top: 10px; }
}

@keyframes sirenDown {
    from { top: 10px; }
    to { top: calc(100% - 30px); }
}

.siren-instruction {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.siren-count {
    color: var(--text-muted);
}

/* Pause Exercise */
.pause-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.pause-sentence {
    font-size: 1.2rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.pause-indicator {
    background: var(--warning);
    color: var(--bg);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    animation: pausePulse 1s ease-in-out infinite;
}

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

/* Humming Exercise */
.humming-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.humming-wave {
    height: 60px;
    background: linear-gradient(90deg,
        transparent, var(--primary), var(--success), var(--primary), transparent);
    border-radius: 30px;
    margin-bottom: 1rem;
    animation: hummingPulse 1s ease-in-out infinite;
}

@keyframes hummingPulse {
    0%, 100% { opacity: 0.5; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

.humming-instruction {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.humming-timer {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Jaw Exercise */
.jaw-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.jaw-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s;
}

.jaw-icon.open {
    transform: scale(1.3);
}

.jaw-instruction {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.jaw-count {
    color: var(--text-muted);
}

/* Vowel Exercise */
.vowel-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.vowel-letter {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.vowel-instruction {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.vowel-progress {
    height: 10px;
    background: var(--surface);
    border-radius: 5px;
    overflow: hidden;
}

.vowel-progress-fill {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.1s linear;
}

/* Articulation Exercise */
.articulation-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.articulation-combo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 0.5rem;
    letter-spacing: 0.2em;
}

.articulation-instruction {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.articulation-timer {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
}

/* Energy Exercise */
.energy-visual {
    text-align: center;
    padding: 1.5rem 0;
}

.energy-word {
    font-size: 3rem;
    font-weight: 700;
    color: var(--danger);
    margin-bottom: 0.5rem;
    animation: energyBounce 0.5s ease-in-out infinite;
}

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

.energy-instruction {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.energy-meter {
    height: 20px;
    background: var(--surface);
    border-radius: 10px;
    overflow: hidden;
}

.energy-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--warning), var(--danger));
    width: 0%;
    transition: width 0.3s;
    border-radius: 10px;
}

/* Reading Guide Styles */
.reading-guide-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--border);
}

.reading-guide-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

#reading-guide-content {
    line-height: 1.8;
    color: var(--text);
}

#reading-guide-content strong {
    color: var(--success);
    font-weight: 600;
}

.guide-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
}

/* Annotated Passage Styles */
.annotated-passage {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    line-height: 2;
    font-size: 1.05rem;
    color: var(--text);
    border-left: 3px solid var(--primary);
}

.annotated-passage .emphasis {
    color: #22c55e;
    font-weight: 600;
}

.annotated-passage .pause {
    color: var(--primary);
    font-weight: 700;
    padding: 0 0.25rem;
    opacity: 0.8;
}

.annotated-passage .pause-long {
    color: var(--primary);
    font-weight: 700;
    padding: 0 0.4rem;
    opacity: 0.9;
}

.show-more-tips-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-tips-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

.show-more-tips-btn i {
    width: 16px;
    height: 16px;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.app-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.app-footer-links a:hover {
    color: var(--primary);
}

.app-footer-links span {
    color: var(--border);
}

/* Auth & User Menu Styles */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-buttons .btn {
    padding: 0.5rem 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.usage-badge {
    background: var(--bg-card);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.usage-badge.warning {
    border-color: var(--warning);
    color: var(--warning);
}

.usage-badge.unlimited {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border: none;
    color: white;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
}

.user-avatar.has-photo {
    background: none;
    padding: 0;
}

.user-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-tier-badge {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100;
    overflow: hidden;
}

.dropdown-header {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-header span:first-child {
    color: var(--text);
    font-weight: 500;
}

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

.tier-label.premium {
    color: #f59e0b;
    font-weight: 600;
}

.tier-label.canceling {
    color: #ef4444;
    font-weight: 600;
    font-size: 0.7rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: linear-gradient(145deg, #0a0a0a, #111111);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(99, 102, 241, 0.1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--text);
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: var(--primary);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 12px;
}

.auth-tab {
    flex: 1;
    padding: 0.875rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.auth-tab:hover:not(.active) {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-group input {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--secondary);
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.terms-checkbox {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

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

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

.btn-full {
    width: 100%;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 0.85rem;
}

/* Google Button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: white;
    color: #333;
    border: 1px solid var(--border);
    font-weight: 500;
}

.btn-google:hover {
    background: #f5f5f5;
}

/* Upgrade Modal */
.upgrade-modal-content {
    text-align: center;
    max-width: 420px;
}

.upgrade-icon {
    margin-bottom: 0.5rem;
}

.upgrade-logo {
    width: 60px;
    height: 60px;
}

.upgrade-modal-content h2 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.upgrade-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.upgrade-features {
    text-align: left;
    margin-bottom: 1.5rem;
}

.upgrade-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    color: var(--text);
}

.feature-icon {
    color: var(--success);
    font-weight: bold;
}

.upgrade-price {
    margin-bottom: 1.5rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

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

.btn-upgrade {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 8px;
}

.btn-upgrade:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.upgrade-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1rem;
}

/* Limit Modal */
.limit-modal-content {
    text-align: center;
    max-width: 380px;
}

.limit-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.limit-modal-content h2 {
    color: var(--text);
    margin-bottom: 0.75rem;
}

.limit-message {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.limit-submessage {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.limit-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Login required overlay */
.login-required-overlay {
    position: relative;
}

.login-required-overlay::after {
    content: 'Log in to start recording';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    border-radius: 12px;
}

/* ============ LEADERBOARD ============ */

.leaderboard-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.leaderboard-section h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.leaderboard-subtitle {
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
}

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

.leaderboard-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-size: 0.95rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.leaderboard-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.leaderboard-item.current-user {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(124, 58, 237, 0.1));
    border-color: var(--primary);
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: var(--card-bg);
    border-radius: 8px;
}

.leaderboard-rank.medal-1 {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #1a1a1a;
}

.leaderboard-rank.medal-2 {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #1a1a1a;
}

.leaderboard-rank.medal-3 {
    background: linear-gradient(135deg, #cd7f32, #b8722d);
    color: #1a1a1a;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.leaderboard-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-initial {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.leaderboard-name {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.leaderboard-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
}

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

.landing-page {
    min-height: 100vh;
    background: #000000;
}

/* Landing Nav */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.landing-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-logo {
    height: 55px;
    width: auto;
}

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

.landing-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.landing-nav-links a:hover {
    color: var(--text);
}

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.mobile-menu.hidden {
    display: none;
}

.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

.mobile-menu a:hover {
    color: var(--primary);
}

.mobile-menu .btn {
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .landing-nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 6rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

.hero-demo {
    background: #000000;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
}

.hero-video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: block;
}

/* Hide video play button overlay on mobile */
.hero-video::-webkit-media-controls {
    display: none !important;
}

.hero-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.hero-video::-webkit-media-controls-panel {
    display: none !important;
}

.hero-video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

.demo-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.wave-bar {
    width: 8px;
    background: var(--primary);
    border-radius: 4px;
    animation: waveAnimation 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 50%; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 70%; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 90%; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 100%; animation-delay: 0.4s; }
.wave-bar:nth-child(6) { height: 90%; animation-delay: 0.5s; }
.wave-bar:nth-child(7) { height: 70%; animation-delay: 0.6s; }
.wave-bar:nth-child(8) { height: 50%; animation-delay: 0.7s; }
.wave-bar:nth-child(9) { height: 30%; animation-delay: 0.8s; }

@keyframes waveAnimation {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

.demo-scores {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.demo-score {
    text-align: center;
    flex: 1;
}

.demo-score-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.demo-score-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--success);
}

@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding-top: 8rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-cta {
        align-items: center;
    }

    .hero-visual {
        width: 100%;
    }
}

/* Section Common Styles */
.how-it-works-section,
.features-section,
.pricing-section,
.faq-section,
.final-cta-section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.how-it-works-section h2,
.features-section h2,
.pricing-section h2,
.faq-section h2,
.final-cta-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* How It Works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.step-card::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    top: -1px;
    left: -60px;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: travelBorder 8s linear infinite;
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
    z-index: 10;
}

.step-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

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

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.step-icon .lucide-icon {
    width: 48px;
    height: 48px;
    stroke: var(--primary);
    stroke-width: 1.5;
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* Features */
.features-section {
    background: var(--bg-card);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.landing-page .feature-card {
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.landing-page .feature-card::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    top: -1px;
    left: -50px;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: travelBorderSmall 7s linear infinite;
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
    z-index: 10;
}

.landing-page .feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.landing-page .feature-card:hover::before {
    opacity: 1;
}

@keyframes travelBorderSmall {
    0% {
        top: -1px;
        left: -50px;
        width: 50px;
        height: 2px;
    }
    25% {
        top: -1px;
        left: calc(100% + 1px);
        width: 50px;
        height: 2px;
    }
    25.1% {
        top: -1px;
        left: calc(100% - 1px);
        width: 2px;
        height: 50px;
    }
    50% {
        top: calc(100% - 50px);
        left: calc(100% - 1px);
        width: 2px;
        height: 50px;
    }
    50.1% {
        top: calc(100% - 1px);
        left: calc(100% - 50px);
        width: 50px;
        height: 2px;
    }
    75% {
        top: calc(100% - 1px);
        left: -1px;
        width: 50px;
        height: 2px;
    }
    75.1% {
        top: calc(100% - 50px);
        left: -1px;
        width: 2px;
        height: 50px;
    }
    100% {
        top: -1px;
        left: -1px;
        width: 2px;
        height: 50px;
    }
}

.landing-page .feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.landing-page .feature-icon .lucide-icon {
    width: 36px;
    height: 36px;
    stroke: var(--primary);
    stroke-width: 1.5;
}

.landing-page .feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.landing-page .feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Who Is This For / Audience Section */
.audience-section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.audience-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

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

.audience-card {
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
}

.audience-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.audience-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.audience-icon .lucide-icon {
    width: 28px;
    height: 28px;
    color: white;
}

.audience-card h3 {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.audience-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .audience-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .audience-grid {
        grid-template-columns: 1fr;
    }
}

/* Leaderboard Landing */
.leaderboard-landing-section {
    padding: 5rem 1.5rem;
    text-align: center;
}

.leaderboard-preview {
    max-width: 400px;
    margin: 2rem auto 0;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.leaderboard-preview-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--border);
    color: var(--primary);
    font-weight: 600;
}

.leaderboard-preview-header .lucide-icon {
    width: 20px;
    height: 20px;
}

.leaderboard-preview-list {
    padding: 0.5rem 0;
}

.leaderboard-preview-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    gap: 1rem;
}

.leaderboard-preview-item .rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.leaderboard-preview-item.gold .rank {
    color: #fbbf24;
}

.leaderboard-preview-item.silver .rank {
    color: #9ca3af;
}

.leaderboard-preview-item.bronze .rank {
    color: #d97706;
}

.leaderboard-preview-item .avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.leaderboard-preview-item .avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.leaderboard-preview-item .name {
    flex: 1;
    text-align: left;
    color: var(--text);
}

.leaderboard-preview-item .score {
    font-weight: 700;
    color: var(--success);
    font-size: 1.1rem;
}

.leaderboard-preview-cta {
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border);
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    border: 2px solid var(--border);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 1rem;
}

/* Traveling light effect */
.pricing-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    overflow: hidden;
    pointer-events: none;
}

.pricing-card::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    top: -1px;
    left: -60px;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: travelBorder 8s linear infinite;
    box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
    clip-path: inset(-10px -10px -10px -10px);
}

.pricing-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

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

.pricing-card-featured {
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
}

.pricing-card-featured:hover {
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

@keyframes travelBorder {
    0% {
        top: -1px;
        left: -60px;
        width: 60px;
        height: 2px;
    }
    25% {
        top: -1px;
        left: calc(100% + 1px);
        width: 60px;
        height: 2px;
    }
    25.1% {
        top: -1px;
        left: calc(100% - 1px);
        width: 2px;
        height: 60px;
    }
    50% {
        top: calc(100% - 60px);
        left: calc(100% - 1px);
        width: 2px;
        height: 60px;
    }
    50.1% {
        top: calc(100% - 1px);
        left: calc(100% - 60px);
        width: 60px;
        height: 2px;
    }
    75% {
        top: calc(100% - 1px);
        left: -1px;
        width: 60px;
        height: 2px;
    }
    75.1% {
        top: calc(100% - 60px);
        left: -1px;
        width: 2px;
        height: 60px;
    }
    100% {
        top: -1px;
        left: -1px;
        width: 2px;
        height: 60px;
    }
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-tier {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.pricing-card-featured .pricing-tier {
    color: var(--primary);
}

.pricing-price {
    margin-bottom: 1.5rem;
}

.pricing-price .price-amount {
    font-size: 3rem;
    font-weight: 700;
}

.pricing-price .price-period {
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    position: relative;
    padding-left: 1.75rem;
}

.pricing-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

@media (max-width: 600px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.faq-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.faq-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* Final CTA */
.final-cta-section {
    text-align: center;
    padding: 6rem 1.5rem;
}

.final-cta-section h2 {
    margin-bottom: 1rem;
}

.final-cta-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Landing Footer */
.landing-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 36px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.footer-column a {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 0.25rem 0;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
    }
}

/* App container when visible */
#app-container {
    animation: fadeIn 0.3s ease-out;
}

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

/* Mobile Auth Modal Fixes */
@media (max-width: 500px) {
    .modal-overlay {
        padding: 0.5rem;
        align-items: flex-start;
        overflow-y: auto;
    }

    .modal-content {
        padding: 1.5rem;
        border-radius: 16px;
        margin: 0.5rem 0;
        max-height: none;
    }

    .auth-header {
        margin-bottom: 1rem;
    }

    .auth-logo {
        width: 50px;
        height: 50px;
        margin-bottom: 0.75rem;
    }

    .auth-header h2 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

    .auth-tabs {
        margin-bottom: 1rem;
    }

    .auth-tab {
        padding: 0.625rem;
        font-size: 0.9rem;
    }

    .auth-form {
        gap: 0.75rem;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .form-group input {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .btn-google {
        padding: 0.625rem;
        font-size: 0.9rem;
    }

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

    .auth-divider {
        margin: 0.75rem 0;
    }

    .auth-divider span {
        font-size: 0.8rem;
    }

    .auth-footer {
        margin-top: 1rem;
        font-size: 0.85rem;
    }

    .forgot-password-link {
        margin-top: 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-height: 700px) and (max-width: 500px) {
    .modal-content {
        padding: 1.25rem;
    }

    .auth-header {
        margin-bottom: 0.75rem;
    }

    .auth-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 0.5rem;
    }

    .auth-header h2 {
        font-size: 1.1rem;
    }

    .auth-tabs {
        margin-bottom: 0.75rem;
    }

    .auth-tab {
        padding: 0.5rem;
    }

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

    .form-group input {
        padding: 0.5rem 0.625rem;
    }

    .auth-divider {
        margin: 0.5rem 0;
    }
}

/* Share Score Button */
.share-score-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-score-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.share-score-btn i {
    width: 18px;
    height: 18px;
}

/* Shareable Score Card (hidden, used for image generation) */
.shareable-score-card {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 400px;
    padding: 2rem;
    background: linear-gradient(145deg, #0f0f1a, #1a1a2e);
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.share-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.share-card-logo {
    width: 180px;
    height: auto;
}

.share-card-overall {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.share-card-overall-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
}

.share-card-overall-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
}

.share-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-metric {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.875rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 0.25rem;
}

.share-metric-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-card-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.share-card-url {
    color: #8b5cf6;
    font-weight: 600;
    margin-left: 0.25rem;
}

/* Weekly Trends Section */
.trends-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border);
}

.trends-section h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.trends-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trend-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.trend-period {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 120px;
}

.trend-period-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.trend-period-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.trend-period-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.trend-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

.trend-change {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.trend-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.trend-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.trend-change.neutral {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
}

.trends-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trends-toggle-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

.trends-toggle-btn i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.trends-toggle-btn.expanded i {
    transform: rotate(180deg);
}

/* Expanded Trends Details */
.trends-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

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

.trend-metric-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 0.875rem;
    text-align: center;
    border: 1px solid var(--border);
}

.trend-metric-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.trend-metric-values {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.trend-metric-current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.trend-metric-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.trend-metric-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.trend-metric-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.trend-metric-change.neutral {
    color: var(--text-muted);
}

.trends-chart-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.trends-chart-container h4 {
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

#trends-chart {
    max-height: 200px;
}

@media (max-width: 500px) {
    .trend-comparison {
        gap: 0.75rem;
    }

    .trend-period-value {
        font-size: 2rem;
    }

    .trends-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trend-arrow {
        padding: 0 0.5rem;
    }
}
