/* songstube.net — dark theme stylesheet
   Palette and structure established across the facsimiles: warm black
   background, fuchsia + cyan accents, monospace for data/labels,
   Oswald (condensed) for song/page titles only. */

@font-face {
    font-family: 'Oswald';
    src: url('fonts/Oswald-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Oswald';
    src: url('fonts/Oswald-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg: #16151A;
    --surface-1: #201F24;
    --surface-2: #2A2830;
    --text-primary: #EDE8DD;
    --text-secondary: #8C8579;
    --accent-primary: #E8368F;
    --accent-secondary: #6FD3EF;
    --border: rgba(237, 232, 221, 0.08);
    --font-body: 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', monospace;
    --font-display: 'Oswald', sans-serif;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.5;
}

a { color: inherit; }

.container { max-width: 680px; margin: 0 auto; }

@media (min-width: 1024px) {
    .container { max-width: 960px; }
}

/* ---------- NAV ---------- */

.nav {
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 1rem 1.5rem;
}
@media (min-width: 1024px) {
    .nav-inner { max-width: 960px; }
}

.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.nav-logo-icon {
    width: 32px; height: 32px;
    background: var(--surface-1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center; gap: 3px;
}
.nav-logo-icon span { width: 4px; border-radius: 2px; }
.nav-logo-icon span:nth-child(1) { height: 10px; background: var(--accent-primary); }
.nav-logo-icon span:nth-child(2) { height: 18px; background: var(--accent-secondary); }
.nav-logo-icon span:nth-child(3) { height: 13px; background: var(--accent-primary); }

.nav-brand-text {
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 16px;
    text-transform: uppercase;
}

.nav-links { display: flex; gap: 22px; font-family: var(--font-body); font-size: 13px; letter-spacing: 0.03em; }
.nav-links a { text-decoration: none; color: var(--text-primary); font-weight: 700; text-transform: uppercase; opacity: 0.85; }
.nav-links a.active { color: var(--accent-secondary); opacity: 1; }

/* ---------- SONG PAGE ---------- */

.page-body { padding: 1.5rem; }

.video-box { background: var(--surface-1); border-radius: 10px; padding: 1rem; margin-bottom: 1.25rem; }
.video-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio, works even without CSS aspect-ratio support */
    height: 0;
    background: var(--surface-2);
    border-radius: 6px;
    overflow: hidden;
}
.video-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-frame iframe {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    inset: 0;
    border: 0;
    display: block;
}
.video-play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.25);
    cursor: pointer;
}
.video-play-button {
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(232, 54, 143, 0.9);
    display: flex; align-items: center; justify-content: center;
}
.video-note {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    margin: 8px 2px 0;
    letter-spacing: 0.03em;
}
.video-note-highlight {
    color: #A855F7;
    display: block;
    font-size: 12px;
    margin-bottom: 2px;
}

.song-header { display: flex; gap: 14px; margin-bottom: 1.25rem; }
.song-cover {
    width: 80px; height: 80px;
    background: var(--surface-1);
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.song-cover img { width: 100%; height: 100%; object-fit: cover; }
.song-cover-fallback {
    display: flex; align-items: center; justify-content: center;
    position: absolute; inset: 0;
    color: var(--accent-secondary);
}
.song-header-info { flex: 1; min-width: 0; }

.song-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 30px;
    margin: 0 0 4px;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1.1;
}
.song-artist {
    font-size: 14px;
    color: var(--accent-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-block;
}
.song-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); margin: 6px 0 0; }

.all-songs-link {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #B0AA9E;
    text-decoration: none;
    text-transform: uppercase;
    margin-top: 4px;
}
.all-songs-link::after {
    content: ' ›';
    font-size: 13px;
}
.all-songs-link:hover { text-decoration: underline; }

.song-description { font-size: 15px; line-height: 1.7; margin: 0 0 1.25rem; }

.lyrics-button {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--bg);
    background: var(--accent-primary);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}

.lyrics-theme-box {
    border-left: 2px solid var(--accent-primary);
    padding: 2px 0 2px 14px;
    margin-bottom: 1.5rem;
}
.section-label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.lyrics-theme-box .section-label { color: var(--accent-primary); }
.lyrics-theme-box p { font-size: 15px; line-height: 1.7; margin: 0; }

.credits-table { border-top: 1px solid var(--border); padding-top: 12px; margin-bottom: 1.5rem; }
.credits-table table { width: 100%; font-size: 13px; border-collapse: collapse; }
.credits-table td { padding: 6px 0; }
.credits-table td:first-child { color: var(--accent-secondary); }
.credits-table td:last-child { text-align: right; }

.similar-songs .section-label { color: var(--accent-secondary); }
.similar-scroll-wrapper { position: relative; }
.similar-scroll-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.similar-scroll-row::-webkit-scrollbar { display: none; }
.similar-scroll-row .similar-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
}
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(22, 21, 26, 0.85);
    color: var(--text-primary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 2;
}
.scroll-arrow-left { left: -6px; }
.scroll-arrow-right { right: -6px; }
.scroll-arrow:hover { background: var(--accent-primary); color: var(--bg); }
.similar-card {
    background: var(--surface-1);
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}
.similar-cover {
    aspect-ratio: 1;
    background: var(--surface-2);
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.similar-cover img { width: 100%; height: 100%; object-fit: cover; }
.similar-title { display: block; font-weight: 500; font-size: 13px; text-transform: uppercase; }
.similar-artist { display: block; color: var(--accent-secondary); font-size: 11px; margin-top: 2px; }

/* ---------- ARTIST PAGE ---------- */

.page-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 30px;
    margin: 0 0 4px;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1.1;
}

.artist-header { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; margin-bottom: 1rem; }

.artist-photo-ring {
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: inline-block;
}
.artist-photo {
    width: 200px; height: 200px;
    background: var(--bg);
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.artist-photo-fallback {
    display: flex; align-items: center; justify-content: center;
    position: absolute; inset: 0;
    color: var(--accent-secondary);
}
.artist-header-info { flex: 1; min-width: 0; }
.artist-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; justify-content: center; }
.badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}
.badge-link { text-decoration: none; display: inline-block; }
.badge-link:hover { background: var(--accent-primary); color: var(--bg); }

.back-link { font-size: 13px; margin-bottom: 1rem; }
.back-link a { color: var(--accent-secondary); text-decoration: none; }
.song-count-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #B0AA9E;
    margin: 0 0 1.5rem;
}

.artist-songs-header { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.artist-songs-avatar {
    width: 44px; height: 44px;
    background: var(--surface-1);
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.artist-songs-avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-songs-header .page-title { margin: 0; }

/* ---------- ARTISTS INDEX PAGE ---------- */

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-1);
    border-radius: 20px;
    padding: 9px 14px;
    margin: 1rem 0 1.25rem;
    color: var(--text-secondary);
}
.search-input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    width: 100%;
    font-family: var(--font-body);
}
.search-input::placeholder { color: var(--text-secondary); }

.az-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.az-letter {
    font-family: var(--font-mono);
    font-size: 13px;
    color: #B0AA9E;
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    text-decoration: none;
}
.az-letter.active { background: var(--accent-primary); color: var(--bg); }

.artist-index-list { display: flex; flex-direction: column; }
.artist-index-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
}
.artist-index-row:last-child { border-bottom: none; }
.artist-index-avatar {
    width: 40px; height: 40px;
    background: var(--surface-1);
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.artist-index-avatar img { width: 100%; height: 100%; object-fit: cover; }
.artist-index-info { display: flex; flex-direction: column; }
.artist-index-name { font-size: 15px; text-transform: uppercase; }
.artist-index-count { font-family: var(--font-mono); font-size: 12px; color: var(--accent-secondary); }

.song-index-list { display: flex; flex-direction: column; }
.song-index-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
}
.song-index-row:last-child { border-bottom: none; }
.song-index-thumb {
    width: 44px; height: 44px;
    background: var(--surface-1);
    border-radius: 6px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.song-index-thumb img { width: 100%; height: 100%; object-fit: cover; }
.song-index-info { display: flex; flex-direction: column; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 1.5rem; }
.pagination-link {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-secondary);
    text-decoration: none;
}

/* ---------- HOMEPAGE ---------- */

.home-hero { text-align: center; padding: 2rem 0 2.5rem; }
.home-hero-icon { display: flex; align-items: flex-end; justify-content: center; gap: 6px; height: 40px; margin-bottom: 12px; }
.home-hero-icon span { width: 8px; border-radius: 4px; }
.home-hero-icon span:nth-child(1) { height: 20px; background: var(--accent-primary); }
.home-hero-icon span:nth-child(2) { height: 38px; background: var(--accent-secondary); }
.home-hero-icon span:nth-child(3) { height: 28px; background: var(--accent-primary); }
.home-hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 42px;
    text-transform: uppercase;
    margin: 0;
}
.home-hero-subtitle { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); margin: 6px 0 0; }

.home-section { margin-bottom: 2rem; }
.home-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.home-see-all {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-secondary);
    text-decoration: none;
}
.home-see-all:hover { text-decoration: underline; }

.home-genre-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 0.75rem; }
.home-genre-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-1);
    border-radius: 20px;
    padding: 8px 14px 8px 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}
.home-genre-chip:hover { background: var(--surface-2); }

/* ---------- FOOTER ---------- */

.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1.5rem; text-align: center; }
.site-footer-text { font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); margin: 0; }
.site-footer-text a { color: var(--accent-secondary); text-decoration: none; margin-left: 6px; }
.site-footer-text a:hover { text-decoration: underline; }

/* ---------- COOKIE BANNER ---------- */

.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #000;
    color: var(--text-primary);
    padding: 14px 20px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    z-index: 999;
    border-top: 1px solid var(--border);
}
.cookie-banner p { font-family: var(--font-mono); font-size: 12px; margin: 0; max-width: 600px; }
.cookie-banner a { color: var(--accent-secondary); }
.cookie-banner-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-banner button {
    background: var(--accent-primary);
    color: var(--bg);
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}
.cookie-banner .cookie-decline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.genre-index-list { display: flex; flex-direction: column; gap: 8px; margin-top: 1.25rem; }
.genre-index-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface-1);
    border-radius: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-primary);
}
.genre-index-row:hover { background: var(--surface-2); }
.genre-index-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
}
.genre-index-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    text-transform: uppercase;
    flex: 1;
}
.genre-index-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.genre-hero { display: flex; align-items: center; gap: 14px; margin-top: 0.5rem; }
.genre-hero-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
}
.genre-hero .page-title { margin: 0; font-size: 36px; }

.genre-artist-list { display: flex; flex-direction: column; gap: 8px; margin-top: 1.25rem; }
.genre-artist-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--surface-1);
    border-radius: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-primary);
}
.genre-artist-row:hover { background: var(--surface-2); }
.genre-artist-photo {
    width: 52px; height: 52px;
    background: var(--surface-2);
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.genre-artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.genre-artist-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    text-transform: uppercase;
    flex: 1;
}
.genre-artist-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-secondary);
    flex-shrink: 0;
}

.photo-attribution {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
    text-align: center;
}

.bio-text::first-letter {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 3.4em;
    line-height: 0.75;
    float: left;
    margin: 4px 8px 0 0;
    color: var(--accent-primary);
}

.top-songs { margin-bottom: 1.5rem; }
.top-songs .section-label { color: var(--accent-secondary); }
.song-list { display: flex; flex-direction: column; }
.song-list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
}
.song-list-row:last-child { border-bottom: none; }
.song-list-icon { color: var(--accent-secondary); flex-shrink: 0; display: flex; }
.song-list-title { font-size: 14px; text-transform: uppercase; }

.similar-artists-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.similar-artists-row::-webkit-scrollbar { display: none; }
.similar-artist-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 120px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--text-primary);
}
.similar-artist-photo {
    width: 110px; height: 110px;
    background: var(--surface-1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
}
.similar-artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.similar-artist-name {
    font-size: 11px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 480px) {
    .artist-photo { width: 140px; height: 140px; }
}

/* ---------- MOBILE ---------- */

@media (max-width: 768px) {
    .song-cover { width: 56px; height: 56px; }
    .song-title { font-size: 24px; }
    .page-body { padding: 1.25rem 1rem; }

    .nav-inner {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 12px;
        padding: 0 1.25rem 0.85rem;
    }
    .nav-links {
        width: 100vw;
        position: relative;
        left: 50%;
        margin-left: -50vw;
        justify-content: space-between;
        gap: 0;
        background: #000;
        box-sizing: border-box;
        padding: 12px 1.25rem;
        border-bottom: 1px solid rgba(237, 232, 221, 0.2);
    }
}
