/* Fanlink pages (stream.charlyfive.com/<slug>/). Source: cli/src/charlyfive_cli/templates/fanlink.css;
   `charlyfive build` publishes it to sites/stream/assets/fanlink.css and links it with ?v=<hash>. */

/* Self-hosted Inter (variable, Latin subset), copied from the main site's assets by `charlyfive build` */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-v20-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
        U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg-dark: #0a0a0f;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #ff00aa 100%);
    --accent-glow: rgba(0, 212, 255, 0.35);
    --spotify: #1DB954;
    --apple: #FA57C1;
    --youtube: #FF0000;
    --youtube-music: #FF0000;
    --amazon: #FF9900;
    --beatport: #94D500;
    --deezer: #FEAA2D;
    --soundcloud: #FF5500;
    --tidal: #000000;
    --bandcamp: #1DA0C3;
    --audiomack: #FFA500;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Blurred background */
.bg-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(80px) saturate(1.5);
    opacity: 0.4;
    transform: scale(1.2);
    z-index: -1;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 70%);
    z-index: -1;
}

/* Main container */
.container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Glassmorphism card */
.card {
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Cover art */
.cover-wrapper {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.cover-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.cover-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Track info */
.track-info {
    text-align: center;
    margin-bottom: 24px;
}

.track-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.artist-name {
    font-size: 1rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Cover wrapper spacing */
.cover-wrapper {
    margin-bottom: 20px;
}

/* Free download button - Ghost style */
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    background: transparent;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #FFFFFF;
    color: #000000;
    border-color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

/* Store buttons */
.store-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.store-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.store-btn:hover::before {
    opacity: 1;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.store-btn:active {
    transform: translateY(0);
}

/* Store-specific colors */
.store-btn.spotify {
    background: var(--spotify);
}

.store-btn.spotify:hover {
    box-shadow: 0 8px 24px rgba(29, 185, 84, 0.4);
}

.store-btn.apple {
    background: var(--apple);
}

.store-btn.apple:hover {
    box-shadow: 0 8px 24px rgba(250, 87, 193, 0.4);
}

.store-btn.youtube {
    background: var(--youtube);
}

.store-btn.youtube:hover {
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.4);
}

.store-btn.deezer {
    background: var(--deezer);
    color: #000;
}

.store-btn.deezer:hover {
    box-shadow: 0 8px 24px rgba(254, 170, 45, 0.4);
}

.store-btn.soundcloud {
    background: var(--soundcloud);
}

.store-btn.soundcloud:hover {
    box-shadow: 0 8px 24px rgba(255, 85, 0, 0.4);
}

.store-btn.tidal {
    background: var(--tidal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.store-btn.tidal:hover {
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.store-btn.youtube-music {
    background: var(--youtube-music);
}

.store-btn.youtube-music:hover {
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.4);
}

.store-btn.amazon {
    background: var(--amazon);
    color: #000;
}

.store-btn.amazon:hover {
    box-shadow: 0 8px 24px rgba(255, 153, 0, 0.4);
}

.store-btn.beatport {
    background: var(--beatport);
    color: #000;
}

.store-btn.beatport:hover {
    box-shadow: 0 8px 24px rgba(148, 213, 0, 0.4);
}

.store-btn.bandcamp {
    background: var(--bandcamp);
}

.store-btn.bandcamp:hover {
    box-shadow: 0 8px 24px rgba(29, 160, 195, 0.4);
}

.store-btn.audiomack {
    background: var(--audiomack);
    color: #000;
}

.store-btn.audiomack:hover {
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.4);
}

/* Store icons (SVG) */
.store-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Footer */
.footer {
    margin-top: 32px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.copyright {
    opacity: 0.8; /* 0.6 gave 4.05:1 contrast; 0.8 stays dimmer than the links and passes AA */
}

/* Responsive */
@media (min-width: 480px) {
    .card {
        padding: 40px 32px;
    }

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

.home-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.home-link:hover,
.home-link:focus-visible {
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 3px;
}

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