/* =============================================
   RESPONSIVE.CSS — Mobile + Tablet breakpoints
   ============================================= */

/* --- Tablet (up to 900px) --- */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 44px;                          /* fallback */
        font-size: clamp(36px, 10vw, 56px);
    }

    .hero-dashboard {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .dash-card {
        width: 100%;
        max-width: 280px;
    }

    .hosts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .channels-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .create-panels {
        grid-template-columns: 1fr;
    }

    .hood-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dev-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .player-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 0;
        gap: 6px;
    }
    .player-info {
        flex: 1;
        order: 1;
        min-width: 0;
    }
    .player-visualizer {
        order: 2;
        padding: 0 4px;
    }
    .player-controls {
        order: 3;
        gap: 4px;
    }
    .player-seek {
        order: 5;
        width: 100%;
        flex: none;
    }
    .player-volume {
        display: none;
    }
    .player-close {
        order: 4;
    }
    .player-btn-main {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .player-btn-sm {
        font-size: 14px;
        padding: 4px;
    }

    .modal-content {
        padding: 24px;
        margin: 12px;
    }
}

/* --- Mobile Performance (768px and below) --- */
@media (max-width: 768px) {
    /* Slightly reduce fog blur radius on mobile (still looks great, saves GPU) */
    .fog-blob {
        filter: blur(60px);
    }

    /* Backdrop-filter handled by perf-tier system (data-perf-tier attribute) */

    /* Entrance scene fixes */
    .entrance-scene {
        perspective: 800px;
        -webkit-perspective: 800px;
    }

    /* Door animation handled entirely by GSAP — no CSS transitions needed */

    .smoke-particle {
        width: 120px;
        height: 120px;
    }

    /* Reduce entrance dust motes and smoke particles on mobile */
    .dust-mote:nth-child(n+7) {
        display: none;
    }
    .smoke-particle:nth-child(n+4) {
        display: none;
    }
}

/* --- Mobile (480px and below) --- */
@media (max-width: 480px) {
    :root {
        --section-padding: 40px;
    }

    .hero-section {
        padding: 60px 16px 40px;
        min-height: 90vh;
    }

    .hero-meta {
        gap: 4px;
    }
    .hero-meta-row {
        flex-direction: column;
        gap: 2px;
    }
    .hero-meta-divider {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-actions .btn {
        justify-content: center;
    }

    .hosts-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .channels-grid {
        grid-template-columns: 1fr;
    }

    .hood-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section-title {
        font-size: 32px;                          /* fallback */
        font-size: clamp(28px, 7vw, 40px);
    }

    .channel-card {
        padding: 20px;
    }

    .create-panel {
        padding: 24px 20px;
    }

    .entrance-title-text {
        font-size: 36px;                          /* fallback */
        font-size: clamp(28px, 8vw, 48px);
    }

    .player-inner {
        padding: 8px 0;
        gap: 4px;
    }
    .player-info {
        flex: 0 0 auto;
        max-width: 55%;
    }
    .player-channel {
        font-size: 10px;
    }
    .player-episode {
        font-size: 12px;
    }
    .player-visualizer {
        display: none;
    }
    .visualizer-bar:nth-child(n+6) {
        display: none;
    }
    .back-to-top {
        width: 40px;
        height: 40px;
        right: 16px;
        font-size: 16px;
    }
    #party-btn {
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.5em;
        bottom: 74px;
    }
    #chat-btn {
        left: 16px;
        bottom: 20px;
        padding: 12px 18px;
        font-size: 0.9em;
        border-radius: 24px;
        box-shadow: 0 4px 20px rgba(102,126,234,0.5);
    }
    #chat-btn.player-active {
        bottom: 96px;
    }
    #chat-panel {
        left: 10px;
        right: 10px;
        bottom: 70px;
        width: calc(100vw - 20px);
        max-height: calc(100vh - 120px);
        border-radius: 12px;
    }

    .modal-content {
        padding: 20px 16px;
    }

    .hood-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hood-actions .btn {
        justify-content: center;
    }
}

/* --- Large Desktop (1400px+) --- */
@media (min-width: 1400px) {
    .channels-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .hero-dashboard {
        gap: 24px;
    }
    .dash-card {
        padding: 24px 36px;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .fog-blob {
        animation: none;
    }

    /* Don't hide entrance — just skip animations. JS handles the phases. */
}
