:root { --a: 180, 90, 255; }
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: #0a0a0f url('../stream/markers.jpg') center/cover fixed no-repeat;
    color: #fff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, .82);
    z-index: -2;
}
body::after {
    content: "";
    position: fixed;
    width: 60vmax;
    height: 60vmax;
    border-radius: 48% 52% 50% 50% / 50% 48% 52% 50%;
    filter: blur(100px);
    opacity: 0.15;
    background: rgb(var(--a));
    bottom: -30vmax;
    right: -20vmax;
    z-index: -1;
    animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(4vmax, 3vmax) scale(1.08) rotate(1deg); }
    100% { transform: translate(8vmax, 6vmax) scale(1.15) rotate(-1deg); }
}

/* Nav */
nav {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
    padding: 1.25rem 2rem;
}
nav a {
    color: #888;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: color .2s;
}
nav a:hover { color: rgb(var(--a)); }

/* Header */
h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0 0 .5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    animation: glow 3s ease-in-out infinite alternate;
}
h1 .accent { color: rgb(var(--a)); }
@keyframes glow {
    from { text-shadow: 0 0 15px rgba(var(--a), .4), 0 0 40px rgba(var(--a), .2); }
    to { text-shadow: 0 0 25px rgba(var(--a), .8), 0 0 60px rgba(var(--a), .4); }
}

/* Buttons */
.btn, .link-button {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    background: rgb(var(--a));
    color: #0a0a0f;
    font-size: .95em;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(var(--a), .4), 0 2px 8px rgba(0,0,0,.3);
    transition: all .35s cubic-bezier(.2, .8, .2, 1);
}
.btn:hover, .link-button:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(var(--a), .7), 0 4px 12px rgba(0,0,0,.4); }

/* Glass Cards - minimal rounding */
.glass {
    position: relative;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 4px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .4), 0 0 20px rgba(var(--a), .06);
    overflow: hidden;
}
.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}
.glass > * { position: relative; z-index: 2; }

/* Now Playing */
#now {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    min-height: 100px;
}
#n-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(50px) saturate(1.6);
    opacity: .2;
    transform: scale(1.4);
    z-index: 0;
    transition: opacity .4s;
}
#n-art, .info { position: relative; z-index: 1; }
#n-art {
    width: 72px;
    height: 72px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
    transition: transform .3s;
}
#now:hover #n-art { transform: scale(1.03); }
.info { flex: 1; min-width: 0; }
.label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .65em;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgb(var(--a));
    font-weight: 600;
}
.eq { display: flex; align-items: flex-end; gap: 2px; height: 10px; }
.eq i {
    width: 2px;
    height: 100%;
    background: rgb(var(--a));
    border-radius: 1px;
    transform-origin: bottom;
    animation: bar .8s ease-in-out infinite alternate;
}
.eq i:nth-child(2) { animation-delay: -.25s; animation-duration: .6s; }
.eq i:nth-child(3) { animation-delay: -.5s; animation-duration: 1s; }
.eq i:nth-child(4) { animation-delay: -.1s; animation-duration: .7s; }
@keyframes bar { from { transform: scaleY(.15); } to { transform: scaleY(1); } }
#now.paused .eq i, #now.idle .eq i { animation-play-state: paused; transform: scaleY(.15); }
#n-title {
    position: relative;
    display: block;
    margin: .3rem 0 .1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .3s ease;
}
#n-title:hover { color: rgb(var(--a)); }
#n-title::after {
    content: "";
    position: absolute;
    inset: -8px -12px;
    z-index: 3;
}
#n-artist { color: #999; font-size: .85em; }
#n-album { color: #555; font-size: .78em; margin-top: .05rem; }
.bar {
    height: 3px;
    margin-top: .6rem;
    border-radius: 2px;
    background: rgba(255, 255, 255, .06);
    overflow: hidden;
}
#n-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    background: rgb(var(--a));
    box-shadow: 0 0 8px rgb(var(--a));
    transition: width .3s linear;
}
#n-time { margin-top: .3rem; font-size: .68em; color: #666; font-variant-numeric: tabular-nums; min-height: 1.2em; }
#now.swap .info > *, #now.swap #n-art { animation: swap .4s cubic-bezier(.2, .8, .2, 1) both; }
#now.swap .info > :nth-child(2) { animation-delay: .04s; }
#now.swap .info > :nth-child(3) { animation-delay: .08s; }
#now.swap .info > :nth-child(4) { animation-delay: .12s; }
@keyframes swap { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
#now.idle #n-art, #now.idle #n-bg { opacity: .06; }
#skip-btn, #queue-btn {
    position: absolute;
    top: 1rem;
    z-index: 3;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 4px;
    color: #888;
    font-size: 1rem;
    padding: .35rem .6rem;
    cursor: pointer;
    transition: all .25s ease;
    display: none;
}
#skip-btn { right: 1rem; }
#queue-btn { right: 3.5rem; font-size: 1.1rem; font-weight: 700; }
#now:not(.idle) #skip-btn, #now:not(.idle) #queue-btn { display: block; }
#skip-btn:hover, #queue-btn:hover {
    color: rgb(var(--a));
    border-color: rgb(var(--a));
    background: rgba(var(--a), .1);
}
#skip-btn.cooldown {
    opacity: .35;
    pointer-events: none;
}

/* Lists */
#lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
#lists section { padding: 1rem; }
h3 { margin: 0 0 .6rem; font-size: .68em; letter-spacing: .14em; text-transform: uppercase; color: #666; font-weight: 600; }
ol { list-style: none; margin: 0; padding: 0; }
li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .3rem;
    border-radius: 3px;
    transition: all .15s;
    animation: rise .4s ease both;
    animation-delay: calc(var(--i) * 50ms);
}
li {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .35rem;
    border-radius: 3px;
    transition: all .3s ease;
    animation: rise .4s ease both;
    animation-delay: calc(var(--i) * 50ms);
}
li:hover { background: rgba(var(--a), .06); transform: translateX(3px); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
li img { width: 36px; height: 36px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
li img.round { border-radius: 50%; }
li div { min-width: 0; display: flex; flex-direction: column; }
li a {
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    font-size: .85rem;
    transition: color .3s ease;
}
li a:hover { color: rgb(var(--a)); }
li a::after {
    content: "";
    position: absolute;
    inset: 0;
}
li span { font-size: .72em; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Facts Card */
.facts-card { padding: 1.5rem; }
.facts-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    color: #fff;
}
.facts-card .subtitle {
    color: #666;
    font-size: .82rem;
    margin-bottom: 1rem;
}
.facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem 1.25rem;
    font-size: .82rem;
    line-height: 1.45;
}
.facts-grid .fact {
    color: #aaa;
    padding-left: 1rem;
    position: relative;
}
.facts-grid .fact::before {
    content: attr(data-num);
    position: absolute;
    left: 0;
    color: rgb(var(--a));
    font-weight: 700;
    font-size: .75rem;
}
.facts-card .read-all {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: 1rem;
    color: rgb(var(--a));
    text-decoration: none;
    font-weight: 600;
    font-size: .82rem;
    transition: gap .15s;
}
.facts-card .read-all:hover { gap: .5rem; }

/* Sharpie Page */
.sharpie-content {
    max-width: 1020px;
    margin: 0 auto;
    padding: 1.5rem;
}
.sharpie-content h2 {
    margin: 1.25rem 0 .6rem;
    font-size: 1.15rem;
    color: rgb(var(--a));
    font-weight: 700;
}
.sharpie-content h2:first-child { margin-top: 0; }
.sharpie-content p { line-height: 1.6; color: #aaa; margin-bottom: .8rem; font-size: .88rem; }
.sharpie-content em { color: rgb(var(--a)); font-style: italic; }
.fact-list {
    margin: 1rem 0 1.25rem 1.25rem;
    line-height: 1.8;
    font-size: .85rem;
    color: #bbb;
    columns: 2;
    column-gap: 2rem;
}
.fact-list li { break-inside: avoid; margin-bottom: .3rem; padding-left: .25rem; }
.fact-list li::marker { color: rgb(var(--a)); font-weight: 600; }
.btn-back {
    display: inline-block;
    margin: 1.25rem auto 0;
    padding: 10px 24px;
    border-radius: 6px;
    background: rgb(var(--a));
    color: #0a0a0f;
    font-size: .95em;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(var(--a), .4), 0 2px 8px rgba(0,0,0,.3);
    transition: all .25s cubic-bezier(.2, .8, .2, 1);
}
.btn-back:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(var(--a), .7), 0 4px 12px rgba(0,0,0,.4); }
.text-center { text-align: center; }

@media (max-width: 768px) {
    body {
        background-position: 60% center;
        background-size: auto 100%;
    }
    body::before { background: rgba(10, 10, 15, .82); }
    .facts-grid { grid-template-columns: 1fr; }
    .fact-list { columns: 1; }
    #now { flex-direction: column; text-align: center; }
    .label { justify-content: center; }
    .info { width: 100%; }
    nav { padding: 1rem 1.25rem; }
    main { padding: 2rem 1rem 1.5rem; }
    header { margin-bottom: 1.5rem; }
    h1 { font-size: 1.8rem; }
    .btn { padding: 10px 20px; font-size: .9rem; }
    #n-art { width: 80px; height: 80px; }
    #lists { grid-template-columns: 1fr; gap: 1rem; }
    .facts-card { padding: 1.25rem; }
    .facts-grid { font-size: .8rem; }
}
/* Toast Notification */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 20, 28, .95);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    padding: .75rem 1.5rem;
    color: #fff;
    font-size: .9rem;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
}
#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#toast.success { border-color: rgb(var(--a)); }
#toast.error { border-color: #ff4444; }

/* Password Modal */
#modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
#modal-overlay.active { display: flex; }
#modal {
    background: rgba(20, 20, 28, .95);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(var(--a), .1);
}
#modal h3 {
    margin: 0 0 .3rem;
    font-size: 1.1rem;
    color: #fff;
}
#modal p {
    color: #777;
    font-size: .85rem;
    margin-bottom: 1.25rem;
}
#modal-input {
    width: 100%;
    padding: .65rem .85rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    font-size: .95rem;
    outline: none;
    margin-bottom: 1.25rem;
    transition: border-color .2s;
}
#modal-input:focus { border-color: rgb(var(--a)); }
#modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}
#modal-actions .btn { padding: .55rem 1.2rem; font-size: .85rem; }

/* Search Results */
#modal-results {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.search-result {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s;
}
.search-result:hover { background: rgba(var(--a), .1); }
.search-result img {
    width: 36px;
    height: 36px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}
.search-result span {
    color: #fff;
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result .search-artist {
    color: #777;
    font-size: .75rem;
}
.search-empty {
    color: #666;
    font-size: .85rem;
    text-align: center;
    padding: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}