*{box-sizing:border-box}

:root{
    --bg:#07070b;
    --line:rgba(255,255,255,.09);
    --text:#ffffff;
    --muted:#a1a1aa;
    --soft:#d4d4d8;
    --accent:#ff3d71;
    --accent2:#7c3aed;
    --green:#20e3b2;
    --yellow:#facc15;
}

body{
    margin:0;
    font-family:Inter,Arial,sans-serif;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,61,113,.16), transparent 32%),
        radial-gradient(circle at 85% 8%, rgba(124,58,237,.22), transparent 35%),
        var(--bg);
    color:var(--text);
}

a{color:inherit;text-decoration:none}
.container{width:min(1180px,92%);margin:0 auto}

.topbar{
    position:sticky;
    top:0;
    z-index:20;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 4%;
    background:rgba(7,7,11,.76);
    backdrop-filter:blur(18px);
    border-bottom:1px solid var(--line);
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:900;
    letter-spacing:-.03em;
}

.brand-mark{
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    border-radius:12px;
    background:linear-gradient(135deg,var(--accent),var(--accent2));
    box-shadow:0 12px 35px rgba(255,61,113,.28);
}

.topbar nav{
    display:flex;
    gap:18px;
    color:var(--muted);
    font-size:14px;
}

.hero{padding:64px 0 44px}

.hero-grid{
    display:grid;
    grid-template-columns:1.2fr .8fr;
    gap:34px;
    align-items:center;
}

.badge,.eyebrow{
    display:inline-flex;
    width:max-content;
    padding:8px 12px;
    border-radius:999px;
    color:#fecdd3;
    background:rgba(255,61,113,.12);
    border:1px solid rgba(255,61,113,.22);
    font-size:13px;
    font-weight:800;
}

.hero h1{
    margin:18px 0 12px;
    max-width:720px;
    font-size:clamp(42px,7vw,82px);
    line-height:.92;
    letter-spacing:-.075em;
}

.hero p{
    max-width:620px;
    color:var(--soft);
    font-size:18px;
    line-height:1.6;
}

.hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:26px;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:12px 18px;
    border-radius:14px;
    border:1px solid transparent;
    font-weight:900;
    cursor:pointer;
    transition:.2s ease;
}

.btn:hover{transform:translateY(-2px)}

.primary{
    background:linear-gradient(135deg,var(--accent),var(--accent2));
    color:white;
    box-shadow:0 16px 40px rgba(255,61,113,.22);
}

.ghost{
    background:rgba(255,255,255,.06);
    border-color:var(--line);
    color:white;
}

.full{width:100%}

.mini-stats{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    margin-top:34px;
}

.mini-stats div{
    min-width:110px;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:18px;
    background:rgba(255,255,255,.045);
}

.mini-stats strong{
    display:block;
    font-size:24px;
}

.mini-stats span{
    color:var(--muted);
    font-size:13px;
}

.featured-card{
    padding:18px;
    border-radius:28px;
    background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.035));
    border:1px solid var(--line);
    box-shadow:0 30px 100px rgba(0,0,0,.35);
}

.featured-label{
    margin-bottom:14px;
    color:var(--green);
    font-size:13px;
    font-weight:900;
}

.featured-cover{
    width:100%;
    height:310px;
    object-fit:cover;
    border-radius:22px;
    background:linear-gradient(135deg,var(--accent),var(--accent2));
}

.placeholder{
    display:grid;
    place-items:center;
    font-size:72px;
}

.featured-card h2{
    margin:18px 0 2px;
    font-size:28px;
    letter-spacing:-.04em;
}

.featured-card p{
    margin:0 0 14px;
    color:var(--muted);
}

audio{
    width:100%;
    margin:12px 0;
    filter:invert(1) hue-rotate(180deg);
}

.market-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:20px;
    margin:28px 0 18px;
}

.market-head h2{
    margin:8px 0 0;
    font-size:34px;
    letter-spacing:-.05em;
}

.searchbar{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

input,textarea,select{
    width:100%;
    padding:13px 14px;
    border-radius:14px;
    border:1px solid var(--line);
    background:rgba(255,255,255,.06);
    color:white;
    outline:none;
}

select{width:150px}
.searchbar input{width:min(330px,70vw)}

.track-list{
    display:grid;
    gap:14px;
    padding-bottom:34px;
}

.track-row{
    display:grid;
    grid-template-columns:86px 1fr 130px;
    gap:18px;
    align-items:center;
    padding:14px;
    border-radius:22px;
    border:1px solid var(--line);
    background:rgba(255,255,255,.055);
    transition:.2s ease;
}

.track-row:hover{
    background:rgba(255,255,255,.085);
    transform:translateY(-2px);
}

.track-cover{
    width:86px;
    height:86px;
    border-radius:18px;
    object-fit:cover;
    background:linear-gradient(135deg,var(--accent),var(--accent2));
}

.track-title-line{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.track-title-line h3{
    margin:0;
    font-size:20px;
    letter-spacing:-.03em;
}

.artist{
    margin:4px 0 8px;
    color:var(--muted);
}

.tag{
    padding:4px 8px;
    border-radius:999px;
    background:rgba(32,227,178,.12);
    color:var(--green);
    font-size:11px;
    font-weight:900;
}

.meta-tags{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.meta-tags span{
    padding:5px 8px;
    border-radius:999px;
    background:rgba(255,255,255,.07);
    color:var(--soft);
    font-size:12px;
}

.track-buy{
    display:grid;
    gap:10px;
    justify-items:end;
}

.price{
    font-size:22px;
    font-weight:950;
    color:var(--yellow);
}

.license-strip{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin:20px 0 60px;
    padding:28px;
    border-radius:28px;
    background:linear-gradient(135deg,rgba(255,61,113,.18),rgba(124,58,237,.16));
    border:1px solid var(--line);
}

.license-strip h2{
    margin:0 0 8px;
    letter-spacing:-.04em;
}

.license-strip p{
    margin:0;
    color:var(--soft);
}

.empty{
    padding:18px;
    border-radius:18px;
    background:rgba(255,255,255,.06);
    border:1px solid var(--line);
}

/* admin/forms compatibility */
.panel{
    width:min(720px,92%);
    margin:48px auto;
    padding:24px;
    border-radius:24px;
    background:rgba(255,255,255,.06);
    border:1px solid var(--line);
}

.narrow{width:min(600px,92%)}

label{
    display:block;
    margin:14px 0 6px;
    color:var(--soft);
}

.success,.error{
    padding:14px 16px;
    border-radius:16px;
    margin:12px 0;
}

.success{
    background:rgba(32,227,178,.12);
    border:1px solid rgba(32,227,178,.22);
}

.error{
    background:rgba(255,61,113,.12);
    border:1px solid rgba(255,61,113,.22);
}

.adminbar{
    display:flex;
    justify-content:space-between;
    gap:18px;
    align-items:center;
    padding:16px 4%;
    background:rgba(7,7,11,.86);
    border-bottom:1px solid var(--line);
}

.adminbar nav{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    color:var(--muted);
}

.stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
    margin:30px auto;
    width:min(1180px,92%);
}

.stat{
    padding:22px;
    border-radius:22px;
    border:1px solid var(--line);
    background:rgba(255,255,255,.06);
}

.stat span{
    display:block;
    font-size:42px;
    font-weight:950;
}

table{
    width:100%;
    border-collapse:collapse;
    margin-top:14px;
}

th,td{
    text-align:left;
    padding:12px;
    border-bottom:1px solid var(--line);
    color:var(--soft);
}

th{color:white}

.panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.back{
    display:inline-block;
    margin:28px 0 0;
    color:var(--soft);
}

@media(max-width:820px){
    .hero-grid{grid-template-columns:1fr}
    .market-head,.license-strip{
        align-items:flex-start;
        flex-direction:column;
    }
    .track-row{grid-template-columns:70px 1fr}
    .track-cover{width:70px;height:70px}
    .track-buy{
        grid-column:1 / -1;
        display:flex;
        justify-content:space-between;
        align-items:center;
        width:100%;
    }
    .topbar{
        align-items:flex-start;
        flex-direction:column;
    }
}

/* V2 detail page additions */
.detail-page{
    padding-bottom:60px;
}

.detail-hero{
    display:grid;
    grid-template-columns:360px 1fr 310px;
    gap:24px;
    align-items:start;
    margin-top:24px;
}

.detail-cover{
    width:100%;
    height:360px;
    object-fit:cover;
    border-radius:28px;
    background:linear-gradient(135deg,var(--accent),var(--accent2));
    border:1px solid var(--line);
    box-shadow:0 30px 90px rgba(0,0,0,.35);
}

.detail-info,.license-box{
    padding:24px;
    border-radius:28px;
    background:rgba(255,255,255,.055);
    border:1px solid var(--line);
}

.detail-info h1{
    margin:16px 0 4px;
    font-size:clamp(34px,5vw,62px);
    line-height:.95;
    letter-spacing:-.07em;
}

.big-artist{
    font-size:18px;
}

.detail-meta,.tag-cloud{
    display:flex;
    flex-wrap:wrap;
    gap:9px;
    margin:16px 0;
}

.detail-meta span,.tag-cloud span{
    padding:7px 10px;
    border-radius:999px;
    background:rgba(255,255,255,.07);
    color:var(--soft);
    font-size:13px;
}

.detail-player{
    margin:18px 0;
    padding:16px;
    border-radius:20px;
    background:rgba(0,0,0,.18);
    border:1px solid var(--line);
}

.detail-player p{
    margin:0 0 8px;
    color:var(--muted);
    font-weight:900;
}

.detail-desc{
    color:var(--soft);
    line-height:1.7;
}

.license-box{
    position:sticky;
    top:92px;
}

.license-box h2{
    margin:8px 0;
    letter-spacing:-.04em;
}

.license-text{
    color:var(--soft);
    line-height:1.6;
}

.license-price{
    font-size:42px;
    font-weight:950;
    color:var(--yellow);
    margin:20px 0;
}

.license-list{
    margin:0 0 22px;
    padding-left:18px;
    color:var(--soft);
    line-height:1.9;
}

.form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
}

.wide-panel{
    width:min(1180px,92%);
}

@media(max-width:980px){
    .detail-hero{
        grid-template-columns:1fr;
    }

    .license-box{
        position:static;
    }
}

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

    .detail-cover{
        height:300px;
    }
}


/* Delete button */
.btn.danger{
    background:linear-gradient(135deg,#ef4444,#b91c1c);
    color:white;
    box-shadow:0 16px 40px rgba(239,68,68,.18);
}
.btn.danger:hover{
    transform:translateY(-2px);
}

.topbar{
    position:sticky;
    top:0;
    z-index:999;
    height:auto;
    padding:14px 34px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    background:rgba(7,7,11,0.72);
    backdrop-filter:blur(18px);
    border-bottom:1px solid rgba(255,255,255,0.08);
}

.logo{
    display:inline-flex;
    align-items:center;
}

.logo img{
    height:95px;
    width:auto;
    object-fit:contain;
    display:block;
    filter:drop-shadow(0 0 14px rgba(168,85,247,0.55));
    transition:transform .25s ease, filter .25s ease;
    animation:logoPulse 3.5s ease-in-out infinite;
}

.logo:hover img{
    transform:scale(1.04);
    filter:drop-shadow(0 0 22px rgba(168,85,247,0.85));
}

@keyframes logoPulse{
    0%,100%{
        filter:drop-shadow(0 0 12px rgba(168,85,247,0.45));
    }
    50%{
        filter:drop-shadow(0 0 24px rgba(168,85,247,0.85));
    }
}

@media(max-width:768px){
    .topbar{
        padding:12px 20px;
    }

    .logo img{
        height:58px;
    }
}

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


/* User login/register */
.auth-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:34px 18px;
    background:
        radial-gradient(circle at 20% 0%, rgba(255,61,113,.18), transparent 35%),
        radial-gradient(circle at 80% 10%, rgba(124,58,237,.24), transparent 38%),
        #07070b;
}

.auth-card{
    width:min(460px,100%);
    padding:28px;
    border-radius:28px;
    background:rgba(255,255,255,.065);
    border:1px solid rgba(255,255,255,.1);
    box-shadow:0 30px 100px rgba(0,0,0,.38);
}

.auth-logo{
    display:inline-flex;
    margin-bottom:20px;
}

.auth-logo img{
    height:82px;
    width:auto;
    object-fit:contain;
    display:block;
    filter:drop-shadow(0 0 18px rgba(168,85,247,0.55));
}

.auth-card h1{
    margin:12px 0 8px;
    font-size:38px;
    line-height:1;
    letter-spacing:-.06em;
}

.auth-subtitle{
    color:var(--soft);
    line-height:1.6;
}

.auth-switch{
    margin:18px 0 0;
    color:var(--soft);
    text-align:center;
}

.auth-switch a{
    color:#c4b5fd;
    font-weight:900;
}

.user-menu{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:14px;
    color:var(--soft);
    font-size:14px;
}

.user-menu a{
    padding:9px 12px;
    border-radius:12px;
    background:rgba(255,255,255,.07);
    border:1px solid rgba(255,255,255,.09);
    color:white;
    font-weight:800;
}


