/* ═══════════════════════════════════════
   Spotify GitHub Widget — Design System
   Modern · Subtle · Responsive
   ═══════════════════════════════════════ */

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #09090b;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #fafafa;
    --text-muted: #71717a;
    --text-dim: #52525b;
    --accent: #1DB954;
    --accent-dim: rgba(29, 185, 84, 0.12);
    --accent-glow: rgba(29, 185, 84, 0.25);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.8;
}

/* ─── Animated Background ─── */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, black 30%, transparent 100%);
}

.bg-glow {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(100px);
    animation: pulse 8s ease-in-out infinite alternate;
}

.glow-1 {
    width: 600px;
    height: 600px;
    top: -300px;
    left: -150px;
    background: var(--accent);
    opacity: 0.06;
}

.glow-2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -100px;
    background: #6366f1;
    opacity: 0.05;
    animation-delay: -4s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.05;
    }

    100% {
        transform: scale(1.15);
        opacity: 0.08;
    }
}

/* ─── Layout ─── */
.container {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

@media (max-width: 640px) {
    .container {
        padding: 24px 16px 40px;
    }
}

/* ─── Navbar ─── */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-row img {
    width: 28px;
    height: 28px;
    transition: transform var(--transition);
}

.logo-row img:hover {
    transform: rotate(-12deg) scale(1.1);
}

.logo-row h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-id {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    background: var(--surface);
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}

@media (max-width: 480px) {
    .nav-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .user-id {
        display: none;
    }
}

/* ─── Typography ─── */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
    border: 1px solid rgba(29, 185, 84, 0.15);
    animation: fadeUp 0.6s ease-out;
}

.hero-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text);
    animation: fadeUp 0.6s ease-out 0.1s both;
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent) 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: clamp(14px, 2.5vw, 16px);
    max-width: 460px;
    line-height: 1.7;
    margin-bottom: 32px;
    animation: fadeUp 0.6s ease-out 0.2s both;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 0 0 var(--accent-glow);
}

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

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 18px;
    font-size: 13px;
}

.btn-outline:hover {
    border-color: var(--border-hover);
    color: var(--text);
    opacity: 1;
}

/* ─── Cards ─── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color var(--transition);
    animation: fadeUp 0.5s ease-out both;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-success {
    border-color: rgba(29, 185, 84, 0.15);
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

/* ─── Code Blocks ─── */
.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    overflow-x: auto;
    position: relative;
    word-break: break-all;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(29, 185, 84, 0.2);
    border-radius: var(--radius-xs);
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all var(--transition);
}

.copy-btn:hover {
    background: rgba(29, 185, 84, 0.2);
}

.copy-btn.copied {
    background: var(--accent);
    color: #000;
}

/* ─── Stats Row ─── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.stat-item {
    text-align: center;
    padding: 18px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.stat-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Features Grid ─── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 28px 0;
}

.feature {
    padding: 24px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    animation: fadeUp 0.5s ease-out both;
}

.feature:nth-child(1) {
    animation-delay: 0.3s;
}

.feature:nth-child(2) {
    animation-delay: 0.4s;
}

.feature:nth-child(3) {
    animation-delay: 0.5s;
}

.feature:nth-child(4) {
    animation-delay: 0.6s;
}

.feature:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 24px;
    margin-bottom: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ─── Customizer Panel ─── */
.customizer-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 12px;
}

.control-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

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

.control-group {
    min-width: 0;
}

.control-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.control-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%2371717a' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--transition);
}

.control-select:hover,
.control-select:focus {
    border-color: var(--accent);
    outline: none;
}

.control-select option {
    background: var(--bg);
    color: var(--text);
}

.control-color {
    width: 100%;
    height: 40px;
    padding: 3px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition);
}

.control-color:hover,
.control-color:focus {
    border-color: var(--accent);
    outline: none;
}

/* ─── Theme Info ─── */
.theme-info {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 16px;
    font-style: italic;
    min-height: 18px;
}

/* ─── Preview Box ─── */
.preview-box {
    margin-bottom: 20px;
}

.preview-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.preview-frame {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    transition: border-color var(--transition);
}

.preview-frame:hover {
    border-color: var(--border-hover);
}

.preview-frame img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    transition: opacity var(--transition);
}

/* ─── Widget Grid ─── */
.theme-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 12px;
}

.theme-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}

.theme-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.theme-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.theme-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.theme-preview {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.theme-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.theme-code {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    position: relative;
    overflow-x: auto;
    word-break: break-all;
}

.theme-code-hint {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.theme-code-hint code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
}

/* ─── Badges ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-green {
    background: var(--accent-dim);
    color: var(--accent);
}

.badge-purple {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

/* ─── Divider ─── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 32px 0;
}

/* ─── Footer ─── */
.footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* ─── Embed Section ─── */
.embed-section {
    margin-top: 16px;
}

/* ─── Theme Preview Tags on Landing ─── */
.theme-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.theme-tag {
    padding: 5px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: capitalize;
    transition: all var(--transition);
}

.theme-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── How It Works ─── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 12px 0 28px;
}

.step {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    transition: all var(--transition);
}

.step:hover {
    border-color: var(--border-hover);
}

.step-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 8px;
    line-height: 1;
}

.step-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

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

/* ─── CTA ─── */
.cta-section {
    text-align: center;
    padding: 40px 0;
    animation: fadeUp 0.5s ease-out 0.7s both;
}

/* ─── Scroll-Reveal Utility ─── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease-out forwards;
}

.reveal-d1 {
    animation-delay: 0.1s;
}

.reveal-d2 {
    animation-delay: 0.2s;
}

.reveal-d3 {
    animation-delay: 0.3s;
}

.reveal-d4 {
    animation-delay: 0.4s;
}

.reveal-d5 {
    animation-delay: 0.5s;
}