/* === APPLE PURE STYLE 2025 === */
:root {
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
    --bg-page: #FFFFFF;
    --text-primary: #1D1D1F;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
*:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 2px; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-weight: 400;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    font-smooth: always;
    font-feature-settings: 'cv11', 'ss01';
}

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

@keyframes marquee-shift {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-1 * var(--marquee-distance, 0px))); }
}

@keyframes blur-in {
    0% { 
        opacity: 0; 
        filter: blur(16px);
        transform: scale(0.8);
    }
    60% { 
        opacity: 1; 
        filter: blur(2px);
        transform: scale(1.02);
    }
    100% { 
        opacity: 1; 
        filter: blur(0);
        transform: scale(1);
    }
}

@keyframes equalize {
    0% { height: 30%; }
    50% { height: 100%; }
    100% { height: 30%; }
}

/* === BROWSER AREA === */
.browser-area {
    flex: 1;
    overflow-y: auto;
    padding-top: max(1.5rem, env(safe-area-inset-top) + 0.5rem);
    padding-bottom: 120px;
    -webkit-overflow-scrolling: touch;
}
.browser-area::-webkit-scrollbar { display: none; }

/* GLOBAL ALIGNMENT - Correct Container */
.app-header, .content-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    width: 100%;
}

/* HEADER */
.app-header {
    padding-top: max(5rem, calc(env(safe-area-inset-top) + 1.5rem)); 
    padding-bottom: 3.5rem; /* Increased from 3rem */
    display: block; 
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}

.header-content { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* === PRO TITLE ANIMATION === */
@keyframes simple-fade-up {
    0% { 
        opacity: 0; 
        transform: translateY(10px); /* Increased movement for clarity */
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes fade-out-up {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.main-title {
    font-size: clamp(2.2rem, 3vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 0.15rem;
    display: block; /* Back to block */
    opacity: 1;
}

/* Helper classes for JS animation */
.main-title.animate-in {
    animation: simple-fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.main-title.animate-out {
    animation: fade-out-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Removed complex char/word splitting styles */

/* === GRID LAYOUT === */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px; /* Apple Music style: tighter gap */
    padding-bottom: 40px; 
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

/* === STATION CARD === */
.station-card {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 3;
    border-radius: 16px; /* Apple Music style: rounder corners */
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    /* Apple Music style: complex double shadow */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.3s ease;
    isolation: isolate;
    /* Fix for black corners/anti-aliasing */
    mask-image: radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    background: transparent; 
    transform: translateZ(0);
    -webkit-tap-highlight-color: transparent;
}

.station-card:hover {
    transform: scale(1.02);
    box-shadow: 0 14px 36px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.06);
    z-index: 10;
}

.station-card:active {
    transform: scale(0.97);
}

.station-card.active {
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}

/* Dark overlay REMOVED for playing state as per request */
.station-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.15s ease;
    border-radius: inherit;
    pointer-events: none;
}
.station-card:active::before {
    opacity: 1; /* Only on click press */
}
.station-card.active::before {
    opacity: 0; /* No dark overlay when playing */
}

/* IMAGE COVER */
.card-cover-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    background: #f0f0f0; /* Neutral bg instead of gradient to avoid bleeding */
}

.card-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    transform: scale(1.01); /* Slight scale to cover edges */
}

.card-cover[src=""] {
    opacity: 0;
}

.station-card:hover .card-cover {
    transform: scale(1.05);
}


/* TEXT INFO */
.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 20px 22px 20px; /* Increased bottom padding to lift text */
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: none;
}

.station-text {
    display: flex;
    flex-direction: column-reverse; /* Subtitle (top in HTML) goes to bottom, Title (bottom in HTML) goes to top. Wait, user wants Subtitle ON TOP. */
    gap: 4px;
    text-align: left;
}

.station-title {
    font-size: 1.45rem; /* Increased from 1.15rem */
    font-weight: 700; /* Bolder for impact */
    color: #FFFFFF;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.station-subtitle {
    font-size: 0.75rem; /* Reduced from 0.85rem */
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px; 
}

/* Static Play Icon in bottom right */
.card-play-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent; /* Removed background circle */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0; /* Removed radius */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    opacity: 1; /* Always visible */
    transform: scale(1);
    transition: all 0.3s ease;
    color: white;
}

.station-card:hover .card-play-icon {
    transform: scale(1.1);
    /* Removed background on hover */
}

/* Hide static icon when playing (active) */
.station-card.active .card-play-icon {
    opacity: 0;
    transform: scale(0.5);
}

.card-play-icon svg {
    width: 28px; /* Increased size slightly since circle is gone */
    height: 28px;
    fill: currentColor;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); /* Added shadow for visibility */
}

/* PLAYING INDICATOR - Replaces card-play-icon when active */
.playing-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    /* Removed background circle */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    z-index: 6;
    display: flex;
    gap: 3px; /* Gap for bars */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none; /* Let clicks hit card */
    transform: scale(0.5); /* Start small */
    padding: 0;
    /* Added filter for visibility */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.station-card.active .playing-indicator {
    opacity: 1;
    transform: scale(1);
}

/* Removed hover effects for indicator (no pause icon on hover) */

/* Equalizer bars container */
.eq-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 18px; /* Slightly larger */
    justify-content: center;
}

.bar {
    width: 4px; /* Slightly thicker */
    background-color: #FFF;
    border-radius: 2px;
    animation: equalize 1s infinite ease-in-out;
}
.bar.n1 { height: 60%; animation-delay: -0.2s; }
.bar.n2 { height: 100%; animation-delay: -0.4s; }
.bar.n3 { height: 70%; animation-delay: -0.6s; }

/* Play icon in indicator - HIDDEN by default, only used as SVG source if needed, but we use CSS pause icon */
.playing-indicator .play-icon {
    display: none;
}

/* Play icon in indicator (shown when paused) - CSS Pause Icon */
.playing-indicator .pause-icon-static {
    display: none;
    width: 16px; /* Adjusted size */
    height: 18px;
    border-left: 5px solid #fff; /* Thicker bars */
    border-right: 5px solid #fff;
    box-sizing: border-box;
    margin-left: 0; /* Center aligned */
}

/* When paused - show PAUSE icon (static bars), hide EQ bars */
.station-card.active.paused .eq-bars {
    display: none;
}
.station-card.active.paused .pause-icon-static {
    display: block; /* Show pause bars */
}

/* Re-enable standard hover scale on active card for interaction feedback */
.station-card.active:hover {
    transform: scale(1.02);
}

/* AMBIENT LIGHT GLOW - Removed/Simplified if not needed or kept subtle */
/* Removed heavy breathing animation to keep it clean Apple style */

/* === COMPACT PLAYER === */
.player-sheet {
    position: fixed; bottom: 24px; left: 0; right: 0;
    display: flex; justify-content: center; z-index: 100;
    pointer-events: none; 
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    padding: 0 16px;
}
.player-sheet.active { 
    transform: translateY(0); 
    opacity: 1;
}

.player-controls-area {
    pointer-events: auto;
    width: 100%; max-width: 560px;
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(20px) saturate(180%); 
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Complex Apple-style shadow with top glow */
    box-shadow: 
        0 32px 64px -8px rgba(0, 0, 0, 0.18), /* Deep, far reaching shadow */
        0 16px 32px -6px rgba(0, 0, 0, 0.12), /* Mid range shadow */
        0 -6px 20px -6px rgba(0, 0, 0, 0.08); /* Top ambient shadow */
    border-radius: 36px;
    padding: 10px 24px 10px 24px;
    height: 64px;
    display: flex; flex-direction: row;
    align-items: center; 
    gap: 20px;
    color: #1d1d1f; /* Dark text */
}

/* PLAYER COVER */
.player-cover-wrapper {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #1b1b1f;
    margin-left: 6px;
}
#playerCover {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* TRACK INFO */
.track-info-compact {
    flex: 1.2;
    display: flex; flex-direction: column; justify-content: center;
    gap: 0;
    overflow: hidden;
    margin-left: 6px;
    margin-right: 10px;
}

/* Track title with blur animation */
@keyframes title-blur-in {
    0% { opacity: 0; filter: blur(8px); }
    100% { opacity: 1; filter: blur(0); }
}

#trackTitle {
    font-size: 0.88rem; font-weight: 600; 
    white-space: nowrap; text-align: left;
    color: #1d1d1f;
    text-overflow: ellipsis; overflow: hidden;
    display: inline-block;
    position: relative;
    width: 100%;
    margin-bottom: -2px;
}

#trackTitle.animate {
    animation: title-blur-in 0.25s ease-out forwards;
}

.track-title-text {
    display: inline-block;
    white-space: nowrap;
    text-overflow: clip;
    padding-right: 0;
}

#trackTitle.marquee {
    mask-image: linear-gradient(to right, transparent 0%, #fff 8%, #fff 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #fff 8%, #fff 92%, transparent 100%);
}
#trackTitle.marquee .track-title-text {
    animation: marquee-shift var(--marquee-duration, 12s) ease-in-out infinite alternate;
}

/* Progress row with time on sides */
.progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.time-display {
    font-size: 0.7rem; font-weight: 500;
    color: rgba(0,0,0,0.5);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 32px;
}

#timeElapsed {
    text-align: left;
}

#timeRemaining {
    text-align: right;
}

/* PROGRESS BAR */
.slider-container {
    flex: 1;
    height: 24px;
    padding: 4px 0;
    display: flex; 
    align-items: center;
    cursor: pointer;
}
#progressBar {
    width: 100%; 
    height: 8px;
    -webkit-appearance: none; 
    appearance: none;
    background: rgba(0,0,0,0.1);
    border-radius: 100px;
    overflow: hidden;
    margin: 0;
    cursor: pointer;
    transition: height 0.2s;
    touch-action: none;
    user-select: none;
}
.slider-container:active #progressBar { height: 10px; }

#progressBar::-webkit-slider-thumb {
    -webkit-appearance: none; 
    width: 0px; height: 0px;
    box-shadow: -100vw 0 0 100vw #1d1d1f;
}

#progressBar::-moz-range-track {
    background: rgba(0,0,0,0.1);
    border-radius: 100px;
}

#progressBar::-moz-range-progress {
    background: #1d1d1f;
    border-radius: 100px;
}

/* CONTROLS */
.compact-controls {
    display: flex; align-items: center; gap: 4px;
    padding-right: 4px;
    margin-left: auto;
}

.ctrl-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: rgba(0,0,0,0.85);
    transition: transform 0.2s, color 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
}
.ctrl-btn:hover { color: #000; transform: scale(1.08); }
.ctrl-btn:active { transform: scale(0.9); }

.ctrl-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Volume Control */
.volume-container {
    display: flex;
    align-items: center;
    margin-right: 8px;
    height: 100%;
    /* Hover target area */
    padding: 0 4px; 
}

.volume-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: color 0.2s;
}
.volume-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.volume-container:hover .volume-btn {
    color: #000;
}

.volume-slider-wrapper {
    width: 0;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    margin-left: 2px;
}

.volume-container:hover .volume-slider-wrapper,
.volume-slider-wrapper:focus-within {
    width: 80px;
}

#volumeSlider {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1d1d1f;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Buffering */
.play-icon.buffering {
    animation: pulse 1.5s infinite;
    opacity: 0.7;
}
@keyframes pulse {
    0% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.5; transform: scale(0.95); }
}

/* === QUESTIONS SECTION === */
.questions-section {
    padding: 48px 0 32px;
    max-width: 100%;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
    text-align: left; /* Left align */
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1D1D1F;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 17px;
    color: #86868B;
    margin-bottom: 24px;
    line-height: 1.4;
}

.questions-preview {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
    max-width: 580px; /* Fixed narrow width for reading comfort */
    /* No auto margins = left align */
}

.question-preview-card {
    background: #F5F5F7;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.question-preview-author {
    font-weight: 600;
    font-size: 15px;
    color: #86868B;
}

.question-preview-date {
    font-size: 13px;
    color: #86868B;
}

.question-preview-text {
    font-size: 19px;
    line-height: 1.4;
    font-weight: 600;
    color: #1D1D1F;
    margin: 0;
    padding: 0 4px;
    letter-spacing: -0.02em;
}

.question-preview-answer {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 16px 20px;
    margin-top: 4px;
}

.question-preview-answer-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.question-preview-answer-logo {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    object-fit: cover;
}

.question-preview-answer-label {
    font-size: 13px;
    font-weight: 600;
    color: #1D1D1F;
}

.question-preview-answer-text {
    font-size: 16px;
    line-height: 1.5;
    color: #1D1D1F;
    opacity: 0.9;
}

.question-preview-actions {
    display: flex;
    justify-content: flex-start;
    padding: 4px;
}

.question-like-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px; /* Reduced padding for compactness */
    border-radius: 999px;
    border: 1px solid transparent; /* Cleaner: no visible border by default */
    background: #F5F5F7; /* Soft grey background */
    color: #1D1D1F;
    font-size: 0.85rem; /* Slightly smaller font */
    font-weight: 600;
    cursor: pointer;
    overflow: visible; /* Crucial for particles to fly out */
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    user-select: none;
    min-width: 0; /* Ensure no forced width */
}

/* Removed ::after ripple to avoid conflict with new particles */

.question-like-button svg {
    width: 18px; /* Slightly smaller icon */
    height: 18px;
    fill: currentColor;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy icon */
}

.question-like-button .like-count {
    min-width: auto; /* Dynamic width */
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.question-like-button:hover:not(.loading) {
    transform: scale(1.04);
    background: #E8E8ED;
}

.question-like-button:active:not(.loading) {
    transform: scale(0.96);
}

.question-like-button.liked {
    color: #FF2D55; /* Apple Pink */
    background: rgba(255, 45, 85, 0.1);
}

.question-like-button.liked svg {
    fill: #FF2D55;
    transform: scale(1.1);
}

.question-like-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* === LIKE PARTICLES === */
.like-particle {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    z-index: 100;
}

.questions-actions {
    margin-top: 24px;
}

.all-questions-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1D1D1F;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s, gap 0.2s;
}
.all-questions-link:hover { 
    opacity: 0.7; 
    gap: 10px;
}
.all-questions-link svg {
    transition: transform 0.2s;
}
.all-questions-link:hover svg {
    transform: translateX(2px);
}

/* === QUESTION MODAL (Main Page) === */
.question-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.question-modal-overlay.active { display: flex; }

.question-modal {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 100%;
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.question-modal h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}
.question-modal .form-group {
    margin-bottom: 20px;
}
.question-modal .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #86868B;
    margin-bottom: 8px;
}
.question-modal .form-group input,
.question-modal .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #D1D1D6;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.question-modal .form-group input:focus,
.question-modal .form-group textarea:focus {
    outline: none;
    border-color: #1D1D1F;
}
.question-modal .form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.question-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
}
.question-modal .btn-secondary {
    background: #F5F5F7;
    border: none;
    color: #1D1D1F;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.question-modal .btn-secondary:hover { background: #E8E8ED; }
.question-modal .btn-primary {
    background: #1D1D1F;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.question-modal .btn-primary:hover { background: #000; }
.question-modal .btn-primary:disabled {
    background: #86868B;
    cursor: not-allowed;
}
.question-modal .modal-note {
    font-size: 13px;
    color: #86868B;
    margin-top: 16px;
    text-align: center;
}

.question-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1D1D1F;
    color: white;
    padding: 16px 28px;
    border-radius: 16px;
    font-weight: 500;
    font-size: 15px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
}
.question-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* === FOOTER === */
.simple-footer { 
    text-align: center; 
    padding-top: 8px; 
    padding-bottom: 140px; 
    opacity: 0; 
    margin-top: 12px;
    margin-bottom: 0; 
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s; 
}

.footer-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.footer-online-text,
.footer-year {
    font-size: 15px;
    color: #86868B;
    font-weight: 400;
}

.simple-footer a.dedication-link { 
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none; 
    color: #1d1d1f;
    font-size: 0.9rem; 
    font-weight: 500;
    opacity: 1;
    transition: opacity 0.2s;
}
.simple-footer a.dedication-link:hover { opacity: 0.6; }
.simple-footer a.dedication-link svg {
    opacity: 0.5;
}


/* === MOBILE === */

@media (max-width: 768px) {
    .browser-area {
        padding-top: max(0.5rem, env(safe-area-inset-top) + 0.25rem);
    }

    .app-header, .content-grid {
        padding-left: 16px; 
        padding-right: 16px;
    }
    
    /* Hide volume on mobile */
    .volume-container { display: none; }

    .app-header { 
        padding-top: max(2.5rem, env(safe-area-inset-top) + 0.5rem); 
        padding-bottom: 1.5rem; /* Increased from 0.75rem */
        gap: 6px;
        display: flex; flex-direction: column;
    }
    
    .header-content { 
        width: 100%; 
        align-items: flex-start;
        max-width: min(88vw, 420px);
        margin: 0 auto;
    }
    
    .main-title { 
        font-size: 30px; 
        margin-top: 0; 
        line-height: 1.1;
        min-height: 2.2rem;
        font-weight: 700;
        text-align: left;
        padding-bottom: 0.1rem;
        width: 100%;
        justify-content: flex-start;
        letter-spacing: -0.5px;
    }
    
    /* GRID */
    .stations-grid { 
        grid-template-columns: 1fr; 
        gap: 20px; /* Increased gap */
        padding-bottom: 28px; 
        justify-items: center;
    }
    
    .simple-footer {
        margin-top: 40px;
        padding-top: 24px;
        padding-bottom: calc(140px + env(safe-area-inset-bottom));
        text-align: left;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .simple-footer .footer-stack {
        align-items: flex-start;
        max-width: min(88vw, 420px);
        margin: 0 auto;
    }
    
    .simple-footer,
    .questions-section {
        opacity: 1 !important;
        animation: none !important;
    }
    
    .section-title,
    .section-subtitle,
    .questions-preview,
    .questions-actions {
        width: min(88vw, 420px);
        margin-left: auto;
        margin-right: auto;
    }

    .questions-section {
        text-align: left; /* Reset alignment on mobile */
    }

    .questions-actions {
        text-align: left; /* Reset alignment on mobile */
        margin-top: 24px; /* Ensure margin is preserved */
    }

    .section-title { font-size: 22px; }
    .section-subtitle { font-size: 16px; margin-bottom: 24px; }
    
    .questions-preview {
        max-width: 100%; /* Reset width on mobile */
    }
    
    .questions-section {
        text-align: left; /* Reset alignment on mobile */
    }
    
    .questions-actions {
        text-align: left; /* Reset alignment on mobile */
    }
    
    .station-card {
        aspect-ratio: 5 / 3; 
        border-radius: 18px; /* More rounded on mobile */
        width: min(88vw, 420px);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .station-card:hover {
        transform: none;
        box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    }
    .station-card:active {
        transform: scale(0.95);
    }
    .station-card:hover .card-cover,
    .station-card:active .card-cover {
        transform: none;
    }
    
    .card-info { padding: 16px 16px 20px 16px; } /* Lifted up on mobile too */
    .station-title { font-size: 1.6rem; font-weight: 700; line-height: 1.1; } /* Reduced size */
    .station-subtitle { font-size: 0.8rem; } /* Slightly smaller on mobile */
    
    /* PLAYER */
    .player-sheet { 
        bottom: calc(12px + env(safe-area-inset-bottom)); 
        padding: 0 12px; 
    }
    
    .player-controls-area { 
        height: 66px; padding: 8px 12px 8px 12px;
        border-radius: 32px;
        max-width: 100%;
        gap: 10px;
    }
    
    .player-cover-wrapper { width: 36px; height: 36px; border-radius: 8px; }
    
    .slider-container {
        height: 28px;
        padding: 6px 0;
    }
    #progressBar {
        height: 10px;
    }
    .slider-container:active #progressBar { height: 14px; }
    
    .ctrl-btn {
        min-width: 38px;
        min-height: 38px;
        border-radius: 16px;
    }
    .ctrl-btn svg { width: 26px; height: 26px; }
}

/* Questions Page Styles */
.questions-header .header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1D1D1F;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 16px;
    transition: opacity 0.2s;
}
.back-link:hover { opacity: 0.5; }

.questions-page-title {
    font-size: 28px !important;
    margin-bottom: 8px;
}
.questions-page-subtitle {
    color: #86868B;
    font-size: 17px;
    line-height: 1.5;
    margin: -4px 0 0 0;
}

.questions-content {
    padding-top: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: simpleFadeIn 0.4s ease forwards;
}

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

.ask-btn-page {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1D1D1F;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 48px;
}
.ask-btn-page:hover { background: #000; }
.ask-btn-page:active { transform: scale(0.97); transition: transform 0.1s; }

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.questions-list .question-preview-card {
    width: 100%;
    max-width: 560px;
}

@media (max-width: 768px) {
    .questions-header .header-content {
        max-width: min(88vw, 420px);
        margin: 0 auto;
        align-items: flex-start;
    }
    .questions-content {
        padding-left: 0;
        padding-right: 0;
        width: min(88vw, 420px);
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        animation: simpleFadeIn 0.4s ease forwards;
    }
    .questions-content .questions-list {
        width: 100%;
    }
    .ask-btn-page {
        width: auto !important;
        margin-top: 16px;
        margin-bottom: 48px !important;
    }
    .questions-list {
        align-items: stretch;
        margin-top: 0;
    }
    .questions-list .question-preview-card {
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #86868B;
}

/* Page transition */
#mainContent {
    transition: opacity 0.2s ease;
}
#mainContent.loading {
    opacity: 0.5;
    pointer-events: none;
}
