*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:           #0b0b0d;
    --surface:      #111115;
    --surface-hi:   #18181e;
    --surface-2:    #18181e;
    --surface-3:    #232330;
    --border:       #232330;
    --border-hi:    #3a3a52;
    --accent:       #e8a04a;
    --accent-glow:  rgba(232, 160, 74, 0.10);
    --accent-dim:   rgba(232, 160, 74, 0.45);
    --text:         #c8c4b8;
    --text-2:       rgba(200, 196, 184, 0.65);
    --text-3:       rgba(200, 196, 184, 0.35);
    --text-muted:   #5a5750;
    --text-bright:  #edeae0;
    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

html { color-scheme: dark; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Courier New', 'Lucida Console', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Page Header ─────────────────────────────────── */

.page-header {
    position: relative;
    z-index: 1;
    padding: 3.5rem 2rem 0;
    max-width: 1120px;
    margin: 0 auto;
}

.header-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: normal;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    line-height: 1;
}

.page-header h1 em {
    font-style: normal;
    color: var(--accent);
}

.header-sub {
    margin-top: 0.8rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.header-rule {
    margin-top: 1.75rem;
    height: 1px;
    background: linear-gradient(to right, var(--border-hi), var(--border), transparent);
}

/* ── Sites Section ───────────────────────────────── */

.sites-section {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem 0;
    max-width: 1120px;
    margin: 0 auto;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-label h2 {
    font-size: 0.6rem;
    font-weight: normal;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.card {
    position: relative;
    background: var(--surface);
    padding: 1.5rem 1.6rem;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
    transition: background 0.12s ease;
    animation: fadeUp 0.5s ease both;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-glow);
    opacity: 0;
    transition: opacity 0.12s ease;
}

.card:hover { background: var(--surface-hi); }
.card:hover::after { opacity: 1; }
.card:hover .card-name { color: var(--accent); }
.card:hover .arrow { transform: translate(3px, -3px); color: var(--accent); }

.card-name {
    font-size: 1rem;
    color: var(--text-bright);
    transition: color 0.12s;
    position: relative;
    z-index: 1;
}

.card-path {
    font-size: 0.75rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.arrow {
    position: absolute;
    top: 0.7rem;
    right: 0.75rem;
    font-size: 0.65rem;
    color: var(--border-hi);
    transition: transform 0.12s ease, color 0.12s ease;
    z-index: 1;
}

/* ── Background ─────────────────────────────────── */

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(232,160,74,0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(11,11,13,0.85) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── Header / Logged-In State ───────────────────── */

header {
    position: relative;
    z-index: 10;
}

#loggedin {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeUp 0.6s var(--ease-out) both;
}

.logged-in-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
}

.logo-mark {
    color: var(--accent);
    opacity: 0.9;
    display: flex;
    align-items: center;
}

.hero-logged-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 60px 24px 40px;
}

.hero-subtitle {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: normal;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    line-height: 1;
}

#logout-button {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border-hi);
    color: var(--text);
    font-family: 'Courier New', 'Lucida Console', 'Monaco', monospace;
    font-size: 12px;
    letter-spacing: 0.05em;
    padding: 8px 16px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

#logout-button:hover {
    background: var(--surface-hi);
    color: var(--accent);
    border-color: var(--accent-dim);
}

#getCurrent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent);
    border: none;
    color: #0b0b0d;
    font-family: 'Courier New', 'Lucida Console', 'Monaco', monospace;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 36px;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.12s var(--ease-out), box-shadow 0.12s;
    box-shadow: 0 0 0 rgba(232,160,74,0);
}

#getCurrent:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px var(--accent-glow);
}

#getCurrent:active {
    transform: scale(0.98);
}

/* ── Main / Login State ─────────────────────────── */

main {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 24px 80px;
}

#login {
    width: 100%;
    max-width: 520px;
    animation: fadeUp 0.7s var(--ease-out) both;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 40px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.login-header {
    margin-bottom: 32px;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 10px;
    font-weight: normal;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: normal;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text-bright);
    margin-bottom: 14px;
}

.login-header h1 em {
    font-style: normal;
    color: var(--accent);
}

.login-desc {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.03em;
    line-height: 1.7;
}

#login-button {
    width: 100%;
    background: var(--accent);
    border: none;
    color: #0b0b0d;
    font-family: 'Courier New', 'Lucida Console', 'Monaco', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 16px 32px;
    border-radius: 2px;
    cursor: pointer;
    margin-bottom: 36px;
    transition: transform 0.12s var(--ease-out), box-shadow 0.12s;
    box-shadow: 0 0 0 rgba(232,160,74,0);
}

#login-button:hover {
    transform: scale(1.01);
    box-shadow: 0 10px 30px var(--accent-glow);
}

#login-button:active {
    transform: scale(0.98);
}

/* ── Steps ──────────────────────────────────────── */

.steps-container {
    border-top: 1px solid var(--border);
    padding-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.steps-label {
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.step {
    display: flex;
    gap: 20px;
    position: relative;
    padding-bottom: 24px;
    animation: fadeUp 0.5s var(--ease-out) both;
}

.step:nth-child(2) { animation-delay: 0.1s; }
.step:nth-child(3) { animation-delay: 0.2s; }
.step:nth-child(4) { animation-delay: 0.3s; }

.step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 32px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--border-hi), transparent);
}

.step-num {
    font-size: 10px;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--accent-dim);
    border-radius: 2px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.step-body {
    flex: 1;
    padding-top: 6px;
}

.step-title {
    font-size: 13px;
    color: var(--text-bright);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.step-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

#code-verifier {
    font-size: 10px;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(232,160,74,0.15);
    border-radius: 2px;
    padding: 10px 14px;
    margin-top: 10px;
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.7;
}

/* ── Song Content ────────────────────────────────── */

#content {
    width: 100%;
    max-width: 420px;
    animation: fadeUp 0.6s var(--ease-out) both;
}

.wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 28px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

#albumArt {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    display: block;
    transition: transform 0.4s var(--ease-out);
}

#albumArt:hover {
    transform: scale(1.02);
}

#content h1 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: normal;
    letter-spacing: -0.01em;
    color: var(--text-bright);
    text-align: center;
    line-height: 1.2;
    margin-top: 4px;
}

#content h2 {
    font-size: 13px;
    font-weight: normal;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.03em;
}

#content p {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 24px 0;
}

/* ── Footer ─────────────────────────────────────── */

footer {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 1rem auto 0;
    padding: 1.25rem 2rem 5rem;
    border-top: 1px solid var(--border);
    font-size: 0.58rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ── Animations ─────────────────────────────────── */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Responsive ─────────────────────────────────── */

@media (max-width: 600px) {
    main {
        padding: 40px 16px 60px;
    }

    .login-card {
        padding: 28px 24px;
    }

    #getCurrent {
        width: 85vw;
        max-width: 320px;
    }
}
