:root {
    --primary: #10b981;
    /* Emerald Green - Harmonia e Energia */
    --primary-hover: #059669;
    --secondary: #3b82f6;
    --accent: #f59e0b;

    /* Base Escura Neutra (Zinc) */
    --dark-bg: #09090b;
    --dark-card: #18181b;

    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;

    /* Glass mais sutil */
    --glass: rgba(24, 24, 27, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);

    --radius: 16px;
    /* Bordas um pouco mais arredondadas */
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
    --player-height: 85px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Outfit', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--dark-bg);
    background-image: radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.08), transparent 25%), radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 25%);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: var(--player-height);
    /* Space for sticky player */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
    pointer-events: none;
    /* Permite clicar no conteúdo lateral */
}

header .container {
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.navbar {
    pointer-events: auto;
    /* Reabilita cliques no menu */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    width: 100%;
    max-width: 1100px;
    min-height: 52px;

    /* Override Glass Defaults for Menu */
    background: rgba(10, 10, 10, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 0.62rem;
    list-style: none;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-links > li {
    display: flex;
    align-items: center;
}

.nav-links > li > a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.93rem;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: var(--text-main);
    text-shadow: none;
}

.nav-links > li > a:not(.nav-dropdown-toggle):not(.nav-link-credits) {
    padding: 0.32rem 0.48rem;
    border-radius: 8px;
}

.nav-links > li > a:not(.nav-dropdown-toggle):not(.nav-link-credits):hover {
    background: rgba(255, 255, 255, 0.04);
}

/* Marca + texto padrão (sem logo upload) */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.navbar-brand-img {
    display: block;
    object-fit: contain;
    max-height: 36px;
    width: auto;
}

.navbar-brand-mark {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.navbar-brand-mark i {
    color: white;
    font-size: 0.76rem;
    margin-left: 2px;
}

.navbar-brand-text {
    font-weight: 800;
    font-size: 1.12rem;
    color: #e8e8f0;
    letter-spacing: -0.03em;
}

.navbar-brand-pro {
    color: #fb923c;
}

.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Dropdown: chevron à direita do texto (padrão) */
.nav-dropdown-toggle {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.36rem;
    cursor: pointer;
    padding: 0.32rem 0.5rem;
    border-radius: 8px;
}

.nav-dropdown-toggle:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.nav-dropdown-chevron {
    font-size: 0.65rem;
    opacity: 0.72;
    margin: 0 !important;
    line-height: 1;
    flex-shrink: 0;
}

.nav-link-credits {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    color: #fbbf24 !important;
    font-weight: 600;
    font-size: 0.93rem;
    padding: 0.32rem 0.5rem;
    border-radius: 8px;
    transition: opacity 0.2s, background 0.2s;
}

.nav-link-credits:hover {
    opacity: 0.92;
    background: rgba(251, 191, 36, 0.08);
    color: #fcd34d !important;
}

.nav-link-credits i {
    font-size: 0.88rem;
}

.nav-auth-login {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.93rem;
    text-decoration: none;
}

.nav-auth-login:hover {
    color: var(--text-main);
}

.btn-auth-register {
    border-radius: 999px;
    padding: 0.34rem 1rem !important;
    font-size: 0.86rem !important;
}

.btn {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Hero Section */
.hero {
    padding: 9rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Professional Image Background */
    background: linear-gradient(to bottom,
            rgba(10, 10, 15, 0.85) 0%,
            rgba(10, 10, 15, 0.7) 50%,
            var(--dark-bg) 100%),
        url('../img/hero-bg.png');
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    .hero {
        padding: 8rem 0 4rem;
    }
}

/* Animated Sparkles / Light Leak Effect */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 20%),
        radial-gradient(circle at 70% 60%, rgba(99, 102, 241, 0.1) 0%, transparent 30%);
    filter: blur(20px);
    opacity: 0.6;
    animation: lightShift 8s infinite alternate ease-in-out;
    z-index: 0;
    pointer-events: none;
}

/* Floating dust/sparkles */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 50px 160px, rgba(255, 255, 255, 0.6), rgba(0, 0, 0, 0)),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 150px 120px, rgba(255, 255, 255, 0.7), rgba(0, 0, 0, 0));
    background-size: 200px 200px;
    opacity: 0;
    animation: sparkleFade 4s infinite linear;
    z-index: 0;
    pointer-events: none;
}

@keyframes lightShift {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes sparkleFade {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-logo {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: floatLogo 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, 0.2));
}

@keyframes floatLogo {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.search-bar {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: var(--dark-card);
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Grid Layouts */
.section-title {
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--glass-border), transparent);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Playback Cards */
.card {
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.card-img-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-overlay {
    opacity: 1;
}

.play-btn-overlay {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.card-body {
    padding: 1.2rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Footer Player */
/* Player Fixo com Novo Visual */
/* Player Fixo com Novo Visual (Floating Island - Glow Animation) */
.player-bar {
    position: fixed;
    bottom: 10px;
    /* Reduced margin */
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 95%;
    max-width: 750px;
    height: 70px;
    background: rgba(15, 15, 20, 0.95);
    border-radius: 50px;
    /* Rounded pill shape */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0 1.5rem;
    z-index: 1000;

    /* Animation State */
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border is handled by pseudos for animation */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.player-bar.active {
    transform: translateY(0);
}

/* Hiding Prev/Next Buttons */
.main-controls .control-btn:not(.play-pause) {
    display: none;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 2px var(--primary));
        opacity: 0.8;
    }

    50% {
        filter: drop-shadow(0 0 8px var(--primary));
        opacity: 1;
    }

    100% {
        filter: drop-shadow(0 0 2px var(--primary));
        opacity: 0.8;
    }
}

/* Professional Player Styles */
.track-thumb,
#player-cover {
    display: none !important;
    /* Remove cover as requested */
}

.track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Align text left */
    flex: 0 1 30%;
    max-width: 34%;
    /* Give it space */
    min-width: 0;
    padding-right: 15px;
}

.track-details {
    width: 100%;
}

.track-details h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    /* Remove multi-line clamp for cleaner single line */
}

.track-details p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.player-controls {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: row;
    /* Horizontal layout for controls + progress */
    align-items: center;
    gap: 18px;
    max-width: none;
    position: relative;
    min-height: 44px;
    overflow: hidden;
    border-radius: 999px;
    padding: 0 14px 0 6px;
    /* padding-right: respiro entre duração e volume */
}

.player-spectrum-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.62;
    filter: saturate(1.15) contrast(1.05);
    mix-blend-mode: screen;
}

.main-controls {
    display: flex;
    align-items: center;
    gap: 0;
    /* No external gap, button is standalone */
    position: relative;
    z-index: 2;
}

/* Redesign Progress Bar Area */
.progress-container {
    flex: 1 1 0%;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    font-size: 0.7rem;
    font-family: 'Outfit', monospace;
    /* Monospace numbers */
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

#current-time {
    grid-column: 1;
}

#duration {
    grid-column: 3;
    padding-right: 2px;
}

#current-time,
#duration {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

/* Progress Bar - Ultra Thin & Modern */
.progress-bar-wrapper {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    /* Só a faixa interior tem cor — padding não pode ter background (parecia “cápsula” grossa) */
    height: 4px;
    padding: 14px 0;
    margin: -14px 0;
    box-sizing: content-box;
    cursor: pointer;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.progress-bar-wrapper:hover .progress-bar {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.progress-bar {
    position: relative;
    z-index: 2;
    flex: 1;
    width: 100%;
    height: 4px;
    min-height: 4px;
    border-radius: 999px;
    /* Track = mesma altura do verde */
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
    transition: background 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.progress-bar::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--pb, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(16, 185, 129, 1), rgba(45, 212, 191, 0.95));
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
    transition: width 0.1s linear;
}

/* Volume - Slim */
.volume-controls {
    flex: 0 0 auto;
    width: 15%;
    min-width: 120px;
    max-width: 200px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.volume-controls i {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

.volume-controls input[type="range"] {
    flex: 1;
    min-width: 110px;
    max-width: 170px;
    height: 22px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.volume-controls input[type="range"]:focus {
    outline: none;
}

/* WebKit track/thumb */
.volume-controls input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.volume-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-top: -4px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12), 0 6px 14px rgba(0, 0, 0, 0.35);
}

/* Firefox track/thumb */
.volume-controls input[type="range"]::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.volume-controls input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12), 0 6px 14px rgba(0, 0, 0, 0.35);
}

/* Control Buttons (Base) */
.control-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.control-btn:hover {
    color: white;
}

/* Play Button Centralized Small */
.control-btn.play-pause {
    background: var(--primary);
    color: white;
    width: 32px;
    /* Small size */
    height: 32px;
    /* Small size */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
    transform: translateY(0);
    position: relative;
    z-index: 1002;
    margin-right: 15px;
    /* Add space between button and progress */
}

.control-btn.play-pause:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Custom Range Slider for Volume */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    margin-top: -3px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.auth-box {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    border-radius: var(--radius);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-credits {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge-credits span {
    color: var(--accent);
    font-weight: bold;
}

/* Admin Specific */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Playback List View (New) */
.playback-list-container {
    background: var(--dark-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.playback-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.playback-table th {
    text-align: left;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
}

.playback-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.playback-table tr:last-child td {
    border-bottom: none;
}

.playback-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Specific Columns */
.col-date {
    width: 100px;
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.col-index {
    width: 50px;
    text-align: center;
    color: var(--text-muted);
}

.col-play {
    width: 50px;
    text-align: center;
}

.play-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.play-icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.col-title {
    font-weight: 500;
    vertical-align: middle;
}

/* Modernização (Overrides nos styles inline do PHP) */
.col-title div span:first-child {
    font-family: 'Inter', sans-serif;
    font-weight: 600 !important;
    /* Reduzido de 700 */
    font-size: 0.85rem !important;
    color: var(--text-main) !important;
    /* Suavizado */
    letter-spacing: -0.01em;
    display: block;
    margin-bottom: 2px;
}

.col-title div span:nth-child(2) {
    font-family: 'Inter', sans-serif;
    font-weight: 400 !important;
    font-size: 0.75rem !important;
    /* Reduzido de 0.85 */
    color: #9ca3af !important;
    /* text-muted mais claro */
    display: block;
    letter-spacing: 0;
}

.col-title span.new-badge {
    color: #eab308;
    /* Star color */
    margin-left: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(234, 179, 8, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.col-formats {
    text-align: right;
    white-space: nowrap;
}

.format-link {
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.format-link.mp3 {
    color: #3b82f6;
}

/* Blue */
.format-link.mp4 {
    color: #ef4444;
}

/* Red */


.btn-download-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    /* Soft square */
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-download-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}


/* Sidebar Layout */
.page-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

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

.category-sidebar-item {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-sidebar-item:hover,
.category-sidebar-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: white;
    border-color: rgba(99, 102, 241, 0.2);
    padding-left: 1.2rem;
    /* Slide effect */
}

.category-sidebar-item.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Modal de Download Customizado */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: var(--dark-card);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    /* Laranja/Amber inspirado na imagem enviada */
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.modal-body h4 {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--text-main);
}

.download-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.mp3-icon {
    font-size: 4rem;
    color: var(--primary);
    /* Verde Esmeralda */
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.arrow-down-anim {
    font-size: 2.5rem;
    color: var(--secondary);
    animation: bounceArrow 1.5s infinite;
}

@keyframes bounceArrow {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

.cost-badge {
    background: var(--secondary);
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    margin-bottom: 1.5rem;
}

.modal-footer-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
    line-height: 1.4;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.btn-confirm-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.btn-confirm-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
}

@keyframes playingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
        border-color: rgba(16, 185, 129, 0.6);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
        border-color: rgba(16, 185, 129, 0.2);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        border-color: rgba(16, 185, 129, 0.6);
    }
}

.playing-card {
    border: 2px solid var(--primary) !important;
    background: var(--primary) !important;
    color: white !important;
    animation: playingPulse 2s infinite;
    transform: scale(1.1);
    z-index: 10;
}

.playing-card i {
    display: inline-block;
}

/* Header Improvements */
.user-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

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

.btn-logout {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(239, 68, 68, 0.05);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.auth-buttons {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.auth-buttons.auth-buttons--compact {
    gap: 0.5rem;
}

/* Active State for Nav */
.nav-links > li > a.active:not(.nav-link-credits):not(.nav-dropdown-toggle) {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.nav-links > li > a.active i {
    color: var(--primary);
}

/* Badge Credits Enhancement */
.badge-credits {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: var(--text-main);
    font-weight: 600;
}

.badge-credits--compact {
    padding: 4px 9px;
    font-size: 0.76rem;
}

.badge-credits i,
.badge-credits-infinity,
.badge-credits-coin {
    color: #fbbf24;
    font-size: 0.9rem;
    line-height: 1;
}

.badge-credits-infinity {
    font-size: 1rem;
}

.badge-credits-value {
    font-variant-numeric: tabular-nums;
}

.header-notif-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.header-notif-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.header-notif-btn i {
    font-size: 0.95rem;
}

.header-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    pointer-events: none;
}

.header-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(16, 185, 129, 0.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 0;
    background: rgba(16, 185, 129, 0.08);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.header-user-avatar:hover {
    transform: scale(1.04);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28);
}

.header-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-logout-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f87171;
    background: rgba(239, 68, 68, 0.06);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.header-logout-btn i {
    font-size: 0.9rem;
}

.header-logout-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-card);
        /* or dark-bg */
        flex-direction: column;
        padding: 1rem;
        display: none;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--shadow);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links > li > a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding: 0.75rem 0.85rem;
        border-radius: 8px;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .nav-links > li > a:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .user-menu {
        display: none;
        /* Combine user menu into nav-links logic later if needed, but for now user might want to keep it separate or adjacent */
    }

    /* Show user menu specific items in mobile if needed, or better: adjust layout */
    .user-menu {
        display: flex;
        /* Keep it visible but maybe smaller? */
    }

    .badge-credits span {
        display: none;
        /* Hide text on very small screens */
    }

    .badge-credits i {
        font-size: 1.2rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navigation Dropdown & Redesign --- */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px);
}

.nav-item-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-muted) !important;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-shadow: none !important;
}

.dropdown-link i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
    transform: translateX(5px);
}

.nav-btn-cta {
    background: linear-gradient(135deg, var(--accent), #ea580c);
    color: white !important;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
    text-shadow: none !important;
}

.nav-btn-cta i {
    font-size: 1.1em;
}

.user-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.user-controls:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(15px);
}

/* Track List Design (Playbacks.php) */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.track-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    /* Smooth rounded corners */
    transition: all 0.2s ease;
    gap: 1rem;
}

.track-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.track-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    flex-shrink: 0;
}

.track-play-btn:hover {
    transform: scale(1.1);
    background: var(--primary-hover);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.5);
}

.track-image {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: #111;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.track-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    /* For truncation */
}

.track-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.track-artist {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.track-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.track-rating {
    display: flex;
    gap: 2px;
    color: var(--accent);
    font-size: 0.8rem;
}

.btn-download-pill {
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-download-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .track-image {
        width: 48px;
        height: 48px;
    }

    .track-play-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .track-title {
        font-size: 1rem;
    }

    .btn-download-pill span {
        display: none;
    }

    /* Show only icon on small mobile */
    .btn-download-pill {
        padding: 0.5rem;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
}

/* Scroll Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modern Table Style (Card Rows) */
.playback-table {
    border-collapse: separate;
    border-spacing: 0 6px;
    /* Gap between rows */
    width: 100%;
    table-layout: fixed;
}

.playback-table tr {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.playback-table tr:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
    position: relative;
}

.playback-table td {
    padding: 0.5rem 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.playback-table td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.playback-table td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.playback-table .btn-download-icon {
    background: rgba(255, 255, 255, 0.08);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    color: var(--text-muted);
}

.playback-table .btn-download-icon:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);

    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Ondas: ocupa todo o espaço entre título e botões (coluna sem width = resto em table-layout:fixed) */
.playback-table td.col-date {
    width: 5.75rem;
    white-space: nowrap;
}

.playback-table td.col-index {
    width: 2.25rem;
    text-align: center;
}

.playback-table td.col-play {
    width: 3.25rem;
    text-align: center;
}

.playback-table td.col-title {
    width: 28%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.playback-table td.col-wave {
    vertical-align: middle;
    width: 52%;
    min-width: 0;
    max-width: none;
    padding: 0.2rem 0.35rem !important;
}

.playback-table td.col-formats {
    width: 6rem;
    white-space: nowrap;
}

.mini-wave-canvas {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 48px;
    min-height: 42px;
    border-radius: 0;
    background: transparent;
    opacity: 1;
}

@media (max-width: 900px) {
    .playback-table td.col-title {
        width: 34%;
    }

    .playback-table td.col-wave {
        width: 46%;
    }

    .mini-wave-canvas {
        height: 40px;
        min-height: 36px;
    }
}

@media (max-width: 640px) {
    .playback-table td.col-title {
        width: 40%;
        font-size: 0.82rem;
    }

    .playback-table td.col-wave {
        width: 40%;
    }

    .playback-table td.col-date {
        width: 4.5rem;
        font-size: 0.75rem;
    }

    .mini-wave-canvas {
        height: 34px;
        min-height: 30px;
    }
}

/* Global Layout Centering */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
    /* Grow to fill space, push footer down */
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 1;
}

.main-content>.container {
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
}

/* --- RESPONSIVE IMPROVEMENTS --- */

/* 1. Typography & Spacing on Mobile */
@media (max-width: 600px) {
    html {
        font-size: 14px;
        /* Slightly header font base */
    }

    .container {
        padding: 0 15px;
        /* Reduce padding */
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        /* Reduce hero title */
    }

    .section-title {
        font-size: 1.4rem;
        margin: 2rem 0 1rem;
    }
}

/* 2. Responsive Tables (Horizontal Scroll) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.table-responsive table {
    min-width: 600px;
    /* Ensure table doesn't squish too much */
}

/* 3. Helper Classes for Mobile Visibility */
.d-none-mobile {
    display: block;
}

@media (max-width: 768px) {
    .d-none-mobile {
        display: none !important;
    }

    /* Adjust Admin Content Padding */
    .admin-content {
        padding: 1rem;
    }
}

/* 4. Player Bar Mobile Adjustments */
@media (max-width: 600px) {
    .player-bar {
        width: 100%;
        border-radius: 0;
        bottom: 0;
        height: auto;
        padding: 10px 15px;
        background: rgba(15, 15, 20, 0.98);
        /* Less transparent for legibility */
        border-top: 1px solid var(--glass-border);
        flex-direction: row;
        /* Keep row but adjust items */
        flex-wrap: wrap;
        /* Allow wrapping if needed */
        gap: 10px;
    }

    .track-info {
        width: 100%;
        margin-bottom: 5px;
        padding-right: 0;
        text-align: center;
        /* Center text on mobile */
        align-items: center;
        display: flex;
        flex-direction: row;
        gap: 10px;
        justify-content: flex-start;
    }

    .track-details h4 {
        font-size: 0.9rem;
    }

    .player-controls {
        width: 100%;
        justify-content: space-between;
    }

    .volume-controls {
        display: none;
        /* Hide volume on mobile (hardware buttons used usually) */
    }

    .progress-container {
        width: 100%;
    }

    /* Play button positioning */
    .main-controls {
        order: -1;
        /* Move play button to left or keep as is? */
    }
}

/* 5. Mobile Admin Toggle Button */
.admin-mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 2001;
    /* Above sidebar */
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

@media (max-width: 768px) {
    .admin-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }
}

/* 6. Hide non-essential columns on mobile */
@media (max-width: 600px) {

    .col-date,
    .col-index {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Home (index) — estatísticas, recentes, FAQ, CTAs
   -------------------------------------------------------------------------- */

.home-hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.75rem;
}

.home-stats-section {
    margin-top: -1rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.home-stat-card {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.home-stat-card-accent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(99, 102, 241, 0.12));
}

.home-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.home-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.home-categories-pills {
    padding: 1.5rem;
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    border: 1px solid var(--glass-border);
}

.home-how-section {
    margin-bottom: 2rem;
}

.home-how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.home-how-card {
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    text-align: center;
}

.home-how-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.home-how-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: white;
}

.home-how-card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.home-section-lead {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: -0.75rem 0 1.25rem;
    max-width: 640px;
    line-height: 1.5;
}

.home-recent-section {
    margin-bottom: 1.75rem;
}

.home-recent-section .container > .home-section-lead {
    font-size: 0.85rem;
    margin: -0.5rem 0 0.85rem;
}

/* Faixa do carrossel à largura total do viewport (full-bleed) */
.home-recent-fullbleed {
    position: relative;
    width: 100vw;
    max-width: 100%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0.65rem 0 0.85rem;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.35));
    border-block: 1px solid rgba(255, 255, 255, 0.05);
}

.home-recent-scroll {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.35rem max(0.75rem, env(safe-area-inset-right)) 0.45rem max(0.75rem, env(safe-area-inset-left));
    margin: 0;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    touch-action: pan-x;
}

.home-recent-scroll.home-recent-scroll--grabbing,
.home-recent-scroll:active {
    cursor: grabbing;
    scroll-behavior: auto;
}

.home-recent-scroll--grabbing,
.home-recent-scroll--grabbing * {
    user-select: none;
}

.home-recent-scroll:focus {
    outline: none;
    box-shadow: inset 0 -2px 0 0 rgba(16, 185, 129, 0.35);
}

.home-recent-scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.home-recent-edge {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 8, 12, 0.72);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.home-recent-edge:hover {
    background: rgba(16, 185, 129, 0.35);
    color: white;
}

.home-recent-edge--prev {
    left: max(6px, env(safe-area-inset-left));
}

.home-recent-edge--next {
    right: max(6px, env(safe-area-inset-right));
}

@media (max-width: 520px) {
    .home-recent-edge {
        display: none;
    }
}

.home-recent-card {
    flex: 0 0 auto;
    width: min(132px, 42vw);
    scroll-snap-align: start;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 28, 0.72);
}

.home-recent-cover {
    position: relative;
    aspect-ratio: 1;
    max-height: 132px;
    background: rgba(0, 0, 0, 0.25);
}

.home-recent-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-recent-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
    transition: transform 0.2s, opacity 0.2s;
}

.home-recent-play:hover {
    transform: scale(1.06);
    opacity: 1;
}

.home-recent-body {
    padding: 0.45rem 0.5rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-height: 0;
}

.home-recent-artist {
    font-size: 0.62rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-recent-title {
    font-size: 0.74rem;
    font-weight: 600;
    color: white;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-recent-stars {
    color: #eab308;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
}

.home-recent-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.home-recent-actions .btn-download-icon {
    font-size: 0.8rem;
    padding: 0.15rem 0.25rem;
}

.home-recent-play.play-icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: none;
    background: var(--primary);
}

.home-recent-footer {
    margin-top: 0.85rem;
    text-align: center;
}

.home-preview-section {
    margin-bottom: 0;
    padding-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.home-preview-catalog-cta {
    margin-top: 2rem;
    margin-bottom: 0;
    padding-bottom: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.btn-catalog-full {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

.home-empty-acervo {
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
}

.home-repertorio-cta {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 3;
    clear: both;
}

.home-repertorio-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.12), rgba(16, 185, 129, 0.08));
}

.home-repertorio-text h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: white;
}

.home-repertorio-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 520px;
    line-height: 1.5;
}

.home-repertorio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home-faq-section {
    margin-bottom: 2rem;
}

.home-faq-list {
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 0;
}

.home-faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-faq-item:last-child {
    border-bottom: none;
}

.home-faq-item summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: white;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.home-faq-item summary::-webkit-details-marker {
    display: none;
}

.home-faq-item summary::after {
    content: '\25BC';
    margin-left: auto;
    font-size: 0.55rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    line-height: 1;
}

.home-faq-item[open] summary::after {
    transform: rotate(180deg);
}

.home-faq-item p {
    margin: 0;
    padding: 0 1.25rem 1.1rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 800px;
}

@media (max-width: 900px) {
    .home-stats-grid {
        grid-template-columns: 1fr;
    }

    .home-how-grid {
        grid-template-columns: 1fr;
    }

    .home-repertorio-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}