/* ==========================================================================
   SoundBPM - Responsividade para Telas Menores e Celulares
   ========================================================================== */
@media (max-width: 900px) {
    .hero-content-wrapper h1 {
        font-size: 2.5rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}


@media (max-width: 768px) {
    body {
        padding-top: 75px;
    }

    .site-header {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 1000;
    }

    .header-container {
        padding: 0.5rem 0.75rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.4rem;
        width: 100%;
        box-sizing: border-box;
    }

    .logo-link {
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .logo {
        font-size: 0.9rem;
    }

    .brand-logo {
        width: 24px;
        height: 24px;
    }

    .desktop-nav-list {
        display: none !important;
    }

    .mobile-tab-selector {
        display: block !important;
        flex-grow: 1;
        max-width: 140px;
        margin: 0 auto;
    }

    .mobile-tab-selector select {
        width: 100%;
        background-color: var(--bg-card);
        color: var(--text-main);
        border: 1px solid var(--border-subtle);
        border-radius: 4px;
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        outline: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dfb15b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 6px center;
        background-size: 12px;
        padding-right: 20px;
    }

    .header-search {
        display: none;
    }

    .header-right {
        gap: 0.3rem;
        flex-shrink: 0;
    }

    .btn-login-nav {
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
    }

    .section-container {
        padding: 2.5rem 1rem;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .hero-carousel-section {
        padding: 3.5rem 1rem 2rem 1rem;
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }

    .hero-features-row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding-top: 1.25rem;
    }

    .hero-feature {
        min-height: 0;
        padding: 0.8rem 1rem;
    }

    .upcoming-grid,
    .news-grid,
    .dashboard-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px;
        width: 100% !important;
        box-sizing: border-box;
    }

    .upcoming-card {
        width: 100% !important;
        box-sizing: border-box;
        padding: 1rem;
        gap: 0.75rem;
    }

    .poster-grid,
    #trending-albums-grid, 
    #albums-page-grid,
    #profile-favorites-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
    }



    /* === AJUSTE DE MOBILE PARA O BANNER E PERFIL === */
    .profile-hero-section {
        margin-top: -4.5rem !important; /* Esconde o topo no mobile tbm */
        min-height: 340px !important;
        margin-bottom: 1.5rem !important;
    }

    .profile-user-bar {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1rem !important;
        padding: 0 1rem 1.5rem 1rem !important;
    }

    .profile-avatar-wrap {
        width: 120px !important;
        height: 120px !important;
        border-width: 3px !important;
    }

    .profile-banner-actions {
        opacity: 1 !important;
        pointer-events: auto !important;
        top: 24px !important;
        right: 10px !important;
    }

    #profile-page button,
    #edit-profile-btn,
    .btn-edit-profile {
        width: auto !important;
        min-width: 110px !important;
        max-width: 150px !important;
        padding: 0.35rem 0.7rem !important;
        font-size: 0.7rem !important;
        margin: 6px auto 0 auto !important;
        display: inline-block !important;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }

    .web-player {
        padding: 0.5rem 1rem;
    }

    .player-logo {
        display: none;
    }
}



@media (max-width: 768px) {
    .badge-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .rank-row { padding: 0.75rem; gap: 0.6rem; }
    .rank-row img { width: 36px; height: 36px; }
}


@media (max-width: 768px) { .profile-title-line { justify-content: center; } .game-toast { left: 20px; right: 20px; text-align: center; } }


@media (max-width: 768px) { .stat-fav { flex-direction: row; text-align: left; } }



@media (max-width: 768px) {
    .footer-col h4 { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
    .footer-col h4::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent-gold); border-bottom: 2px solid var(--accent-gold); transform: rotate(45deg); transition: transform 0.3s ease; }
    .footer-col.open h4::after { transform: rotate(-135deg); }
    .footer-col h4 + ul { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.4s ease, opacity 0.3s ease; }
    .footer-col.open h4 + ul { max-height: 260px; opacity: 1; }
    .sr-left, .sr-right { transform: translateY(26px); }
}

@media (prefers-reduced-motion: reduce) {
    .sr { opacity: 1; transform: none; transition: none; }
    .acc-body, .acc-icon, .acc-inner > div { transition: none; }
}




@media (max-width: 768px) {
    .cm-review { flex-direction: column; gap: 0.7rem; padding: 0.9rem; }
    .cm-cover { width: 64px; height: 64px; }
    .cm-form { flex-direction: column; }
    .cm-form button { width: 100% !important; max-width: none !important; }
    .vd-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }

    /* ===== PERFIL NO CELULAR: organização e posicionamento ===== */
    #profile-page { overflow-x: hidden; }
    .profile-hero-section { margin-top: 0 !important; min-height: 390px !important; }
    .profile-user-bar { gap: 0.8rem !important; padding-top: 3.5rem !important; }
    #profile-username-display { font-size: 1.7rem !important; overflow-wrap: anywhere; }
    #profile-bio-display { max-width: 100% !important; text-align: center; }
    .profile-user-bar > div { width: 100%; }
    #profile-page .profile-title-line { justify-content: center !important; gap: 0.5rem; }
    #profile-page .profile-title-line button { margin: 0 !important; min-width: 0 !important; max-width: none !important; }
    #btn-edit-profile { align-self: center !important; margin: 0 auto !important; }
    .profile-banner-actions {
        top: 0.5rem !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        flex-wrap: wrap;
        justify-content: center !important;
        max-width: none !important;
        gap: 0.4rem;
    }
    #profile-page .profile-banner-actions button, #profile-page .profile-banner-actions label { min-width: 0 !important; max-width: none !important; margin: 0 !important; padding: 0.35rem 0.6rem !important; font-size: 0.7rem !important; }
    #profile-page h3 { font-size: 1.05rem; margin-bottom: 1rem !important; }
    #profile-favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0.75rem !important; }
    #profile-favorites-grid > .poster-card {
        position: relative !important;
        width: 100% !important;
        max-width: 280px;
        min-width: 0;
        justify-self: center;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 10px;
    }
    #profile-favorites-grid > .poster-card > img {
        display: block;
        width: 100% !important;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 0 !important;
    }
    #profile-favorites-grid > .poster-card > h4 {
        margin: 0.55rem 0 0 !important;
        padding: 0 0.6rem 0.5rem;
        font-size: 0.95rem !important;
    }
    #profile-page #profile-favorites-grid .remove-favorite-btn {
        position: absolute !important;
        top: 0.55rem !important;
        right: 0.55rem !important;
        left: auto !important;
        bottom: auto !important;
        display: grid !important;
        place-items: center !important;
        width: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid rgba(255, 255, 255, 0.28) !important;
        border-radius: 50% !important;
        background: rgba(14, 15, 22, 0.82) !important;
        color: #fff !important;
        font-size: 1.25rem !important;
        line-height: 1 !important;
        box-sizing: border-box !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    }
    #profile-page #profile-favorites-grid .remove-favorite-btn:hover,
    #profile-page #profile-favorites-grid .remove-favorite-btn:focus-visible {
        background: var(--accent-gold) !important;
        border-color: var(--accent-gold) !important;
        color: #161616 !important;
    }
    #profile-reviews-list .diary-item { gap: 0.8rem !important; padding: 0.8rem !important; }
    #profile-reviews-list .diary-item > img { width: 52px !important; height: 52px !important; flex-shrink: 0; }
    #profile-reviews-list .diary-item > div { min-width: 0; }
    #profile-reviews-list button { max-width: none !important; width: auto !important; white-space: normal; }
    #profile-reviews-list .diary-item > button { position: absolute !important; top: 0.4rem; right: 0.4rem; min-width: 0 !important; margin: 0 !important; padding: 0.2rem 0.5rem !important; }
    #profile-stats .badge-grid, #profile-gamification .badge-grid { grid-template-columns: repeat(2, 1fr); }
    .activity-item { padding: 0.7rem 0.8rem; gap: 0.6rem; }
    .game-tier-xp { line-height: 1.5; }
}

