/* --- CSS Custom Properties --- */
:root {
    /* Core palette */
    --bg-primary: #06060e;
    --bg-secondary: #0c0c1a;
    --bg-card: rgba(14, 14, 30, 0.65);
    --bg-card-hover: rgba(20, 20, 45, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);

    /* Accent colors */
    --accent-primary: #7c5cfc;
    --accent-primary-rgb: 124, 92, 252;
    --accent-secondary: #00e5ff;
    --accent-secondary-rgb: 0, 229, 255;
    --accent-tertiary: #ff3cac;
    --accent-tertiary-rgb: 255, 60, 172;
    --accent-warm: #ff6b35;

    /* New Green Accent for Sync Status */
    --accent-success: #00ff88;
    --accent-success-rgb: 0, 255, 136;

    /* Text */
    --text-primary: #eeeef5;
    --text-secondary: rgba(238, 238, 245, 0.55);
    --text-tertiary: rgba(238, 238, 245, 0.3);
    --text-accent: var(--accent-secondary);

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(124, 92, 252, 0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-primary:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", monospace;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-fast: 150ms var(--ease-out);
    --transition-base: 300ms var(--ease-out);
    --transition-slow: 500ms var(--ease-out);
    --transition-spring: 400ms var(--ease-spring);

    /* Shadows */
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(var(--accent-primary-rgb), 0.15);
    --shadow-glow-strong: 0 0 60px rgba(var(--accent-primary-rgb), 0.25);
    --shadow-island:
        0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body.view-song-active {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

input {
    font: inherit;
}

/* --- Ambient Background --- */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%,
            black 30%,
            transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%,
            black 30%,
            transparent 100%);
}

.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    z-index: -2;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.bg-glow--1 {
    width: 600px;
    height: 600px;
    background: rgba(var(--accent-primary-rgb), 0.15);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.bg-glow--2 {
    width: 500px;
    height: 500px;
    background: rgba(var(--accent-secondary-rgb), 0.1);
    top: 40%;
    right: -10%;
    animation-delay: -7s;
}

.bg-glow--3 {
    width: 450px;
    height: 450px;
    background: rgba(var(--accent-tertiary-rgb), 0.08);
    bottom: -10%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -20px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 30px) scale(0.95);
    }

    75% {
        transform: translate(20px, 20px) scale(1.02);
    }
}

/* --- Navigation (Dynamic Island) --- */
.nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px 24px;
    background: rgba(18, 18, 20, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    box-shadow: var(--shadow-island);
    transition: all var(--transition-spring);
    width: 90%;
    max-width: 800px;
}

.nav.nav--expanded {
    max-width: 850px;
    background: rgba(18, 18, 20, 0.85);
}

.nav.nav--scrolled {
    top: 12px;
    padding: 8px 20px;
    max-width: 760px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.nav__logo:hover {
    transform: scale(1.05);
}

.nav__logo-icon {
    font-size: 1.5rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(var(--accent-primary-rgb), 0.5));
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(var(--accent-primary-rgb), 0.5));
    }

    50% {
        filter: drop-shadow(0 0 16px rgba(var(--accent-primary-rgb), 0.8));
    }
}

.nav__logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg,
            var(--accent-primary),
            var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav__search {
    flex: 1;
    max-width: 420px;
    position: relative;
    display: flex;
    align-items: center;
}

.nav__search-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.nav__search:focus-within .nav__search-icon {
    color: var(--accent-secondary);
}

.nav__search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition: all var(--transition-base);
}

.nav__search-input::placeholder {
    color: var(--text-tertiary);
}

.nav__search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.nav__stats {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.lang-switcher {
    position: relative;
    display: flex;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px;
    margin-right: var(--space-xl);
    width: 90px;
    height: 32px;
}

.lang-switcher__slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 42px;
    height: 26px;
    background: white;
    border-radius: var(--radius-full);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-switcher--it .lang-switcher__slider {
    transform: translateX(42px);
}

.lang-btn {
    position: relative;
    z-index: 1;
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-secondary);
}

.lang-btn--active {
    color: #06060e !important;
}

.nav__stat {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav__stat-num {
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    font-weight: 500;
}

/* --- Main Content --- */
.main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 80px;
}

.view {
    animation: viewEnter 0.6s var(--ease-out) both;
}

.view--song {
    position: fixed;
    inset: 80px 0 0 0;
    background: var(--bg-primary);
    z-index: 50;
    overflow: hidden;
    transition: bottom 0.4s var(--ease-out);
}

@keyframes viewEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: var(--space-4xl) var(--space-2xl) var(--space-3xl);
}

.hero__badge {
    display: inline-block;
    padding: 6px 18px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--accent-secondary);
    border: 1px solid rgba(var(--accent-secondary-rgb), 0.2);
    border-radius: var(--radius-full);
    background: rgba(var(--accent-secondary-rgb), 0.05);
    margin-bottom: var(--space-lg);
    animation: badge-shimmer 3s ease-in-out infinite;
}

@keyframes badge-shimmer {

    0%,
    100% {
        border-color: rgba(var(--accent-secondary-rgb), 0.2);
    }

    50% {
        border-color: rgba(var(--accent-secondary-rgb), 0.5);
    }
}

.hero__title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
}

.hero__title-line {
    display: block;
}

.hero__title-line--accent {
    background: linear-gradient(135deg,
            var(--accent-primary) 0%,
            var(--accent-secondary) 50%,
            var(--accent-tertiary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 480px;
    margin: 0 auto var(--space-xl);
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg,
            var(--accent-primary),
            var(--accent-secondary));
    border-radius: var(--radius-full);
    box-shadow: 0 4px 20px rgba(var(--accent-primary-rgb), 0.3);
    transition: all var(--transition-base);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(var(--accent-primary-rgb), 0.5);
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero__cta svg {
    transition: transform var(--transition-fast);
}

.hero__cta:hover svg {
    transform: translateY(2px);
}

.hero__cta--disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.8);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    box-shadow: none !important;
    cursor: not-allowed;
}

.hero__cta--disabled:hover {
    transform: none !important;
    filter: grayscale(0.8) !important;
}

.view-home__controls {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-xl);
    padding: 0 var(--space-2xl);
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 6px 6px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sort-controls__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

.sort-controls__options {
    display: flex;
    gap: 4px;
}

.sort-btn {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.sort-btn svg {
    transition: transform var(--transition-base);
}

.sort-btn:active svg {
    transform: rotate(180deg);
}

.sort-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sort-btn--active {
    color: white;
    background: var(--accent-primary) !important;
    box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.3);
}

.sort-btn--spinning svg {
    animation: spin 0.6s var(--ease-out);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    padding: 0 var(--space-2xl) 140px;
    /* Increased bottom padding for floating player */
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Song Card --- */
.song-card {
    position: relative;
    background: rgba(20, 20, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-spring);
    animation: cardEnter 0.5s var(--ease-out) both;
}

.song-card:nth-child(1) {
    animation-delay: 0.1s;
}

.song-card:nth-child(2) {
    animation-delay: 0.2s;
}

.song-card:nth-child(3) {
    animation-delay: 0.3s;
}

.song-card:nth-child(4) {
    animation-delay: 0.4s;
}

.song-card:nth-child(5) {
    animation-delay: 0.5s;
}

.song-card:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.song-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-island), var(--shadow-glow);
    background: rgba(30, 30, 45, 0.6);
}

.song-card__cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.song-card__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.song-card:hover .song-card__cover {
    transform: scale(1.08);
}

.song-card__cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(6, 6, 14, 0.95) 0%,
            rgba(6, 6, 14, 0.3) 40%,
            transparent 70%);
    transition: opacity var(--transition-base);
}

.song-card__play-hint {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-primary-rgb), 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.7);
    transition: all var(--transition-base);
    box-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.3);
}

.song-card__play-hint svg {
    width: 20px;
    height: 20px;
    fill: white;
    margin-left: 2px;
}

.song-card:hover .song-card__play-hint {
    opacity: 1;
    transform: scale(1);
}

.song-card__info {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.song-card__genre {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    margin-bottom: var(--space-xs);
}

.song-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card__artists {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--space-md);
}

.song-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-subtle);
}

.song-card__duration {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.song-card__year {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.song-card__explicit {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border: 1px solid rgba(var(--accent-tertiary-rgb), 0.4);
    border-radius: 4px;
    color: var(--accent-tertiary);
    background: rgba(var(--accent-tertiary-rgb), 0.08);
}

.song-card__timing {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 2px 6px;
    border: 1px solid rgba(var(--accent-tertiary-rgb), 0.4);
    border-radius: 4px;
    color: var(--accent-success);
    border-color: rgba(var(--accent-success-rgb), 0.3);
    background: rgba(var(--accent-success-rgb), 0.08);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(var(--accent-success-rgb), 0.4);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-2xl);
}

.empty-state__icon {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.empty-state__text {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* --- Back Button --- */
.back-btn {
    position: fixed;
    top: calc(20px + var(--space-lg));
    left: var(--space-2xl);
    z-index: 110;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    margin: 0 0 var(--space-lg) var(--space-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

.back-btn:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
    border-color: rgba(var(--accent-primary-rgb), 0.3);
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .back-btn {
        top: calc(80px + var(--space-md));
        left: var(--space-md);
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* --- Song Detail --- */
.song-detail {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 80px var(--space-2xl) 0;
    /* More top padding for absolute back button */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.song-detail__bg {
    position: fixed;
    inset: -20%;
    background-size: cover;
    background-position: center;
    filter: blur(140px) brightness(0.4) saturate(2);
    opacity: 0.8;
    z-index: -1;
    transition: background-image 1.2s ease-in-out;
}

.song-detail__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%,
            transparent 0%,
            rgba(6, 6, 14, 0.8) 100%);
}

.song-detail__grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: var(--space-2xl);
    align-items: stretch;
    height: 100%;
    flex: 1;
    min-height: 0;
}

.song-detail__left {
    padding-top: var(--space-md);
    padding-bottom: var(--space-2xl);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
}

.song-detail__left::-webkit-scrollbar {
    display: none;
}

.song-detail__right {
    height: 100%;
    overflow-y: auto;
    padding-top: var(--space-xl);
    padding-right: var(--space-xl);
    padding-bottom: 300px;
    /* Large padding for scrolling lyrics to center */
    /* Custom scrollbar for lyrics column */
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-primary-rgb), 0.3) transparent;
}

.song-detail__right::-webkit-scrollbar {
    width: 6px;
}

.song-detail__right::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-primary-rgb), 0.3);
    border-radius: 3px;
}

.song-detail__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    animation: slideUp 0.6s var(--ease-out) 0.1s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.song-detail__cover-wrap {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.song-detail__cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.song-detail__cover-glow {
    position: absolute;
    inset: -20%;
    z-index: -1;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    background: var(--accent-primary);
    animation: cover-pulse 4s ease-in-out infinite;
}

@keyframes cover-pulse {

    0%,
    100% {
        opacity: 0.25;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.1);
    }
}

.song-detail__meta {
    flex: 1;
    min-width: 0;
    padding-top: var(--space-sm);
}

.song-detail__genre {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-secondary);
    padding: 4px 12px;
    border: 1px solid rgba(var(--accent-secondary-rgb), 0.2);
    border-radius: var(--radius-full);
    background: rgba(var(--accent-secondary-rgb), 0.05);
    margin-bottom: var(--space-md);
}

.song-detail__info-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.song-detail__text-group {
    flex: 1;
    min-width: 0;
}

.detail-play-btn {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: #1db954;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(29, 185, 84, 0.4);
    transition: all var(--transition-base);
}

.detail-play-btn:hover {
    transform: scale(1.1);
    background: #1ed760;
    box-shadow: 0 15px 40px rgba(29, 185, 84, 0.6);
}

.detail-play-btn svg {
    width: 32px;
    height: 32px;
}

#detail-play-icon {
    align-content: center;
    /* Optical centering for play icon */
}

.song-detail__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
    background: linear-gradient(135deg,
            var(--text-primary) 0%,
            rgba(238, 238, 245, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.song-detail__artists {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.song-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 5px 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.tag--explicit {
    color: var(--accent-tertiary);
    border-color: rgba(var(--accent-tertiary-rgb), 0.3);
    background: rgba(var(--accent-tertiary-rgb), 0.08);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.tag--download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    border-color: rgba(var(--accent-primary-rgb), 0.3);
    background: rgba(var(--accent-primary-rgb), 0.08);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.tag--play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1db954;
    border-color: rgba(29, 185, 84, 0.3);
    background: rgba(29, 185, 84, 0.08);
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
}

.tag--play:hover {
    background: rgba(29, 185, 84, 0.2);
    border-color: rgba(29, 185, 84, 0.5);
    box-shadow: 0 0 16px rgba(29, 185, 84, 0.2);
    transform: translateY(-1px);
}

/* --- Mini Player (Liquid Glass / Aero) --- */
.mini-player {
    position: fixed;
    bottom: 24px;
    left: 50%;
    z-index: 2100;
    width: 90%;
    max-width: 800px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: translate(-50%, 150%);
    transition:
        transform var(--transition-spring),
        bottom var(--transition-spring);
}

.mini-player--active {
    transform: translate(-50%, 0);
}

.mini-player__inner {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.mini-player__left {
    flex: 1;
    min-width: 0;
}

.mini-player__center {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 600px;
}

.mini-player__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.mini-player__song {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: auto;
    min-width: 0;
}

.mini-player__cover {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.mini-player__meta {
    min-width: 0;
}

.mini-player__next {
    position: absolute;
    top: -95px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(12, 12, 20, 0.85);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.6s var(--ease-spring);
    pointer-events: none;
    z-index: -1;
}

.mini-player--active .mini-player__next {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.3s;
}

.mini-player__next-label {
    font-size: 0.55rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--accent-secondary);
    opacity: 0.8;
}

.mini-player__next-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-player__next-cover {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mini-player__next-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.mini-player__next-artist {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.mini-player__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player__artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-player__main-btns {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.player-btn:hover {
    color: var(--text-primary);
    transform: scale(1.05);
}

.player-btn--play {
    width: 40px;
    height: 40px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    padding: 0;
}

.player-btn--play svg {
    width: 24px;
    height: 24px;
}

.player-btn--play:hover {
    transform: scale(1.1);
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.player-btn--icon {
    width: 32px;
    height: 32px;
    color: var(--text-tertiary);
}

.player-btn--icon svg {
    width: 18px;
    height: 18px;
}

.player-btn--icon:hover {
    color: var(--text-primary);
}

.mini-player__progress-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    min-width: 40px;
}

.player-progress-container {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.player-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 2;
    cursor: pointer;
}

.player-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: var(--text-primary);
    border-radius: 2px;
    z-index: 1;
}

.player-progress-container:hover .player-progress-fill {
    background: var(--accent-primary);
}

.player-progress-container:hover .player-progress-fill::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.mini-player__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-glass);
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.mini-player__close:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.mini-player__close svg {
    width: 18px;
    height: 18px;
}

.tag--download:hover {
    background: rgba(var(--accent-primary-rgb), 0.2);
    border-color: rgba(var(--accent-primary-rgb), 0.5);
    box-shadow: 0 0 16px rgba(var(--accent-primary-rgb), 0.2);
    transform: translateY(-1px);
}

.tag--download svg {
    flex-shrink: 0;
}

.tag--timing {
    color: var(--accent-success);
    border-color: rgba(var(--accent-success-rgb), 0.3);
    background: rgba(var(--accent-success-rgb), 0.08);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-shadow: 0 0 8px rgba(var(--accent-success-rgb), 0.4);
}

.song-detail__streaming {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.streaming-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.streaming-link:hover {
    background: var(--bg-glass-hover);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.streaming-link svg {
    width: 16px;
    height: 16px;
}

/* Service Colors */
.streaming-link--spotify:hover {
    border-color: #1db954;
    color: #1db954;
    box-shadow: 0 0 15px rgba(29, 185, 84, 0.2);
}

.streaming-link--applemusic:hover {
    border-color: #fa243c;
    color: #fa243c;
    box-shadow: 0 0 15px rgba(250, 36, 60, 0.2);
}

.streaming-link--youtube:hover {
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

.streaming-link--deezer:hover {
    border-color: #ef5466;
    color: #ef5466;
    box-shadow: 0 0 15px rgba(239, 84, 102, 0.2);
}

.streaming-link--tidal:hover {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.streaming-link--amazon:hover {
    border-color: #00a8e1;
    color: #00a8e1;
    box-shadow: 0 0 15px rgba(0, 168, 225, 0.2);
}

/* --- Lyrics Section --- */
.song-detail__lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
    animation: slideUp 0.6s var(--ease-out) 0.25s both;
}

.song-detail__lyrics-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.song-detail__lyrics-label svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent-primary);
}

.song-detail__lyrics-title {
    flex-shrink: 0;
}

[data-i18n="lyrics_description"] {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-tertiary);
    line-height: 1.4;
    display: inline-block;
    vertical-align: middle;
}

.song-detail__lyrics-format {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    padding: 4px 10px;
    border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
    border-radius: var(--radius-sm);
    background: rgba(var(--accent-primary-rgb), 0.05);
}

.lyrics-container {
    animation: slideUp 0.6s var(--ease-out) 0.35s both;
    padding-bottom: 50vh;
    /* Space for scrolling the last line to the center */
}

.lyrics-line {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    opacity: 0.3;
    transform: scale(0.98);
    transform-origin: left center;
}

.lyrics-line--active {
    opacity: 1;
    transform: scale(1.05) translateX(12px);
    background: rgba(255, 255, 255, 0.05);
}

.lyrics-line:hover:not(.lyrics-line--active) {
    opacity: 0.7;
    background: var(--bg-glass-hover);
    filter: blur(0);
}

.lyrics-line__time {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
    min-width: 52px;
    transition: color var(--transition-base);
}

.lyrics-line--active .lyrics-line__time {
    color: var(--accent-primary);
}

.lyrics-line__text {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.lyrics-line--active .lyrics-line__text {
    color: #fff;
    font-weight: 800;
    text-shadow: 0 4px 40px rgba(255, 255, 255, 0.4);
}

/* Lyrics line entrance animation */
.lyrics-line {
    animation: lyricEnter 0.4s var(--ease-out) both;
}

@keyframes lyricEnter {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-subtle);
    background: rgba(6, 6, 14, 0.5);
    backdrop-filter: blur(10px);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-2xl);
}

.footer__brand {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

.footer__copy {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-primary-rgb), 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-primary-rgb), 0.5);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav {
        padding: 8px 16px;
        gap: var(--space-sm);
        top: 12px;
        width: 95%;
    }

    .nav.nav--expanded {
        max-width: 98%;
        padding: 8px 12px;
    }

    .nav__stats {
        display: none;
    }

    .nav__search {
        max-width: 100%;
        flex: 1;
    }

    .nav__logo-text {
        display: none;
        /* Hide text on small screens to save space */
    }

    .hero {
        padding: var(--space-2xl) var(--space-md) var(--space-xl);
    }

    .hero__title {
        font-size: 2rem;
    }

    .songs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        padding: 0 var(--space-md) 140px;
        gap: var(--space-md);
    }

    .song-card__title {
        font-size: 1rem;
    }

    .song-detail {
        padding: 0 var(--space-md) var(--space-2xl);
        height: auto;
        overflow: visible;
        margin-top: 80px;
    }

    .song-detail__grid {
        grid-template-columns: 1fr;
        height: auto;
        gap: var(--space-2xl);
    }

    .song-detail__right {
        overflow: visible;
        height: auto;
        padding-right: 0;
        padding-top: 0;
    }

    .song-detail__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-md);
    }

    .song-detail__cover-wrap {
        width: 240px;
        height: 240px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    }

    .song-detail__info-row {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: var(--space-lg);
    }

    .detail-play-btn {
        position: relative;
        bottom: auto;
        right: auto;
        width: 56px;
        height: 56px;
    }

    .song-detail__tags {
        justify-content: center;
    }

    .back-btn {
        position: fixed;
        top: 120px;
        left: 10px;
        background: rgba(18, 18, 20, 0.75);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        z-index: 1050;
        /* Ensure it's above the background and other elements */
        padding: 8px 16px;
    }

    .lyrics-line {
        padding: 16px 0;
        text-align: center;
        transform-origin: center center;
    }

    .lyrics-line--active {
        transform: scale(1.05);
    }

    .lyrics-line__text {
        font-size: 1.5rem;
    }

    .lyrics-line__time {
        display: none;
        /* Hide timestamps on mobile for cleaner look */
    }

    .mini-player {
        padding: 8px 16px;
        bottom: 16px;
        border-radius: 24px;
        width: 95%;
    }

    .mini-player__inner {
        flex-wrap: nowrap;
        /* Keep on a single line */
        gap: var(--space-sm);
    }

    .mini-player__left {
        flex: 1;
        min-width: 0;
        /* Allow title to truncate gracefully */
    }

    .mini-player__center {
        order: unset;
        /* Revert to default order */
        width: auto;
        flex: 0 0 auto;
    }

    .mini-player__right {
        flex: 0 0 auto;
        gap: var(--space-md);
    }

    .player-btn--icon {
        width: 28px;
        height: 28px;
    }

    .mini-player__cover {
        width: 44px;
        height: 44px;
    }

    .mini-player__progress-wrap,
    #player-go-detail,
    #mini-player-close {
        display: none !important;
    }

    .footer__inner {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .songs-grid {
        grid-template-columns: 1fr;
    }

    .song-detail__cover-wrap {
        width: 160px;
        height: 160px;
    }

    .hero__title {
        font-size: 1.8rem;
    }
}

/* --- Lyrics Overlay --- */
.lyrics-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.5s var(--ease-out),
        visibility 0.5s var(--ease-out);
    overflow: hidden;
}

.lyrics-overlay--active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.lyrics-overlay__background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(100px) brightness(0.3);
    opacity: 0.6;
    z-index: -1;
    transform: scale(1.1);
    pointer-events: none;
}

.lyrics-overlay__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px 140px;
    /* Space for the player at bottom */
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.lyrics-overlay__header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    animation: slideUp 0.8s var(--ease-out);
}

.lyrics-overlay__cover {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.lyrics-overlay__meta h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: #fff;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.lyrics-overlay__meta p {
    font-size: 1rem;
    color: var(--text-tertiary);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.lyrics-overlay__container {
    flex: 1;
    overflow-y: auto;
    padding: 40px 0 100px;
    scrollbar-width: none;
    mask-image: linear-gradient(to bottom,
            transparent,
            black 15%,
            black 85%,
            transparent);
    -webkit-mask-image: linear-gradient(to bottom,
            transparent,
            black 15%,
            black 85%,
            transparent);
}

.lyrics-overlay__container::-webkit-scrollbar {
    display: none;
}

.lyrics-overlay__close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-out);
    z-index: 2200;
    /* Above close button and everything */
}

.lyrics-overlay__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Override for lyrics in overlay */
.lyrics-overlay .lyrics-line {
    padding: 24px 0;
    font-size: 2.2rem;
    max-width: 800px;
    cursor: pointer;
    transform-origin: center left;
}

.lyrics-overlay .lyrics-line:hover {
    opacity: 0.8;
    transform: scale(1.02) translateX(5px);
}

.lyrics-overlay .lyrics-line--active {
    transform: scale(1.08) translateX(12px);
    opacity: 1;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.lyrics-overlay .lyrics-line__time {
    display: none;
}

@media (max-width: 768px) {
    .lyrics-overlay__content {
        padding: 40px 20px;
    }

    .lyrics-overlay .lyrics-line {
        font-size: 1.5rem;
        padding: 16px 0;
    }

    .lyrics-overlay__meta h2 {
        font-size: 1.5rem;
    }
}

.lyrics-overlay__controls {
    display: none;
    align-items: center;
    gap: 24px;
    margin-top: 40px;
    animation: fadeIn 1s var(--ease-out) 0.5s both;
}

.lyrics-overlay--immersive .lyrics-overlay__controls {
    display: flex;
}

.lyrics-overlay__controls .player-btn--play {
    width: 72px;
    height: 72px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.2);
    transition: all 0.4s var(--ease-spring);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyrics-overlay__controls .player-btn--play:hover {
    transform: scale(1.1);
    box-shadow: 0 16px 48px rgba(255, 255, 255, 0.4);
    background: #fff;
}

.lyrics-overlay__controls .player-btn--play svg {
    width: 32px;
    height: 32px;
}

.lyrics-overlay__controls .player-btn--icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--ease-spring);
}

.lyrics-overlay__controls .player-btn--icon:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lyrics-overlay__controls .player-btn--icon svg {
    width: 24px;
    height: 24px;
}

/* --- Lyrics Overlay Immersive Mode (Split Screen) --- */
@media (min-width: 1024px) {
    .lyrics-overlay--immersive .lyrics-overlay__content {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        max-width: 1400px;
        gap: 100px;
        padding: 60px 80px;
    }

    .lyrics-overlay--immersive .lyrics-overlay__header {
        flex: 1;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        margin-bottom: 0;
        animation: slideRight 1s var(--ease-out);
    }

    .lyrics-overlay--immersive .lyrics-overlay__cover {
        width: clamp(300px, 35vw, 450px);
        height: clamp(300px, 35vw, 450px);
        border-radius: var(--radius-lg);
        box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
        margin-bottom: 40px;
    }

    .lyrics-overlay--immersive .lyrics-overlay__meta h2 {
        font-size: 3rem;
        line-height: 1.1;
        margin-bottom: 12px;
    }

    .lyrics-overlay--immersive .lyrics-overlay__meta p {
        font-size: 1.4rem;
        opacity: 0.8;
    }

    .lyrics-overlay--immersive .lyrics-overlay__container {
        flex: 1.4;
        height: 100%;
        padding: 15vh 0;
        /* Center lyrics vertically better */
        mask-image: linear-gradient(to bottom,
                transparent,
                black 25%,
                black 75%,
                transparent);
        -webkit-mask-image: linear-gradient(to bottom,
                transparent,
                black 25%,
                black 75%,
                transparent);
    }

    .lyrics-overlay--immersive .lyrics-line {
        font-size: 2.8rem;
        padding: 30px 0;
        max-width: 100%;
    }

    .lyrics-overlay--immersive .lyrics-line--active {
        transform: scale(1.1) translateX(20px);
    }

}

/* Hide mini-player elements in fullscreen */
.body--fullscreen-immersive .mini-player {
    transform: translateY(200%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Selection --- */
::selection {
    background: rgba(var(--accent-primary-rgb), 0.3);
    color: var(--text-primary);
}

#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    background: radial-gradient(circle at center, #0c0c1a 0%, #06060e 100%);
}

.view-home__divider {
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--border-subtle),
            transparent);
    margin: 60px auto;
}

/* ============================================
   SONG OF THE DAY FEATURE STYLES
   ============================================ */
.song-of-the-day-section {
    max-width: 1000px;
    width: 90%;
    margin: 0 auto 50px auto;
    animation: cardEnter 0.6s var(--ease-out) both;
}

.song-of-the-day-container {
    position: relative;
    overflow: visible;
    background: rgba(20, 20, 35, 0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition-slow), box-shadow var(--transition-slow);
}

.song-of-the-day-container:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 40px rgba(var(--accent-primary-rgb), 0.15);
}

.sotd-glow {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(60px);
    opacity: 0.18;
    z-index: -1;
    pointer-events: none;
    transition: transform var(--transition-slow);
}

.song-of-the-day-container:hover .sotd-glow {
    transform: scale(1.08);
}

.sotd-badge {
    position: absolute;
    top: 24px;
    right: 28px;
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: var(--accent-secondary);
    border: 1px solid rgba(var(--accent-secondary-rgb), 0.25);
    border-radius: 99px;
    background: rgba(var(--accent-secondary-rgb), 0.05);
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(var(--accent-secondary-rgb), 0.1);
    animation: badge-shimmer 4s ease-in-out infinite;
}

.sotd-content {
    display: flex;
    gap: 32px;
    align-items: center;
}

.sotd-left {
    flex-shrink: 0;
}

.sotd-cover-wrap {
    position: relative;
    width: 170px;
    height: 170px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transition: transform var(--transition-spring), box-shadow var(--transition-spring);
    cursor: pointer;
}

.sotd-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.sotd-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sotd-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(var(--accent-primary-rgb), 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-spring);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(var(--accent-primary-rgb), 0.35);
}

.sotd-play-btn svg {
    width: 22px;
    height: 22px;
    fill: white;
    margin-left: 3px;
}

.sotd-cover-wrap:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.sotd-cover-wrap:hover .sotd-cover {
    transform: scale(1.08);
}

.sotd-cover-wrap:hover .sotd-cover-overlay,
.sotd-cover-wrap:hover .sotd-play-btn {
    opacity: 1;
}

.sotd-cover-wrap:hover .sotd-play-btn {
    transform: translate(-50%, -50%) scale(1);
}

.sotd-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sotd-meta {
    display: flex;
    flex-direction: column;
}

.sotd-genre {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--accent-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.sotd-title {
    font-size: 1.8rem;
    font-weight: 850;
    line-height: 1.2;
    color: white;
    margin-bottom: 2px;
    background: linear-gradient(90deg, #ffffff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.sotd-artists-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.sotd-artists {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 600;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.sotd-bullet {
    color: var(--text-tertiary);
    font-weight: bold;
    font-size: 1rem;
    user-select: none;
}

.sotd-duration {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.tag--timing {
    color: var(--accent-success) !important;
    border-color: rgba(var(--accent-success-rgb), 0.25) !important;
    background: rgba(var(--accent-success-rgb), 0.04) !important;
    font-weight: 650;
    letter-spacing: 0.05em;
}

.tag--download {
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
}

.tag--download:hover {
    background: rgba(var(--accent-primary-rgb), 0.15) !important;
    border-color: rgba(var(--accent-primary-rgb), 0.4) !important;
    color: var(--accent-primary) !important;
    transform: translateY(-1px);
}

.sotd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.sotd-date-block {
    border-left: 2.5px solid var(--accent-secondary);
    padding-left: 16px;
    margin: 12px 0 4px 0;
    max-width: 90%;
}

.sotd-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.sotd-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.sotd-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 650;
    border-radius: 9999px;
    transition: all var(--transition-base);
    cursor: pointer;
}

.sotd-cta--primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 14px rgba(var(--accent-primary-rgb), 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sotd-cta--primary:hover {
    transform: translateY(-2.5px);
    box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb), 0.45);
    filter: brightness(1.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.sotd-cta--secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.sotd-cta--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2.5px);
    color: white;
}

.sotd-calendar-btn-wrap {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 50;
}

.sotd-calendar-popover {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 12px;
    width: 280px;
    background: rgba(14, 14, 30, 0.92);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 229, 255, 0.05);
    z-index: 100;
}

@keyframes popoverEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sotd-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.sotd-cal-month-year {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
}

.sotd-cal-arrow {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all var(--transition-base);
}

.sotd-cal-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.sotd-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.sotd-cal-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 6px;
}

.sotd-cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-base);
}

.sotd-cal-day:hover:not(.sotd-cal-day--disabled):not(.sotd-cal-day--other) {
    background: rgba(0, 229, 255, 0.15);
    color: var(--accent-secondary);
    font-weight: bold;
}

.sotd-cal-day--active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)) !important;
    color: white !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}

.sotd-cal-day--today {
    border: 1px dashed rgba(0, 229, 255, 0.5);
    color: var(--accent-secondary);
    font-weight: bold;
}

.sotd-cal-day--other {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

.sotd-cal-day--disabled {
    opacity: 0.15;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE STYLES FOR SONG OF THE DAY
   ============================================ */
@media (max-width: 768px) {
    .song-of-the-day-section {
        margin-bottom: 40px;
    }

    .song-of-the-day-container {
        padding: 24px;
    }

    .sotd-badge {
        position: static;
        display: inline-block;
        margin-bottom: 20px;
        align-self: flex-start;
    }

    .sotd-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .sotd-cover-wrap {
        width: 140px;
        height: 140px;
        border-radius: 14px;
    }

    .sotd-right {
        align-items: center;
        width: 100%;
        gap: 12px;
    }

    .sotd-artists-row {
        justify-content: center;
    }

    .sotd-tags {
        justify-content: center;
    }

    .sotd-date-block {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 14px 0;
        margin: 12px 0 8px 0;
        max-width: 100%;
        width: 100%;
    }

    .sotd-actions {
        justify-content: center;
        width: 100%;
    }

    .sotd-cta {
        width: 100%;
        max-width: 260px;
    }

    .sotd-calendar-btn-wrap {
        bottom: 16px;
        right: 16px;
    }
}

/* --- Discord Navbar Button --- */
.nav__discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #5865f2;
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-spring);
}

.nav__discord-btn:hover {
    transform: scale(1.08) translateY(-1px);
    background: #4752c4;
    box-shadow: 0 6px 16px rgba(88, 101, 242, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav__discord-btn svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    transition: transform var(--transition-base);
}

.nav__discord-btn:hover svg {
    transform: rotate(4deg) scale(1.05);
}

@media (max-width: 768px) {
    .nav__discord-btn {
        width: 32px;
        height: 32px;
    }

    .nav__discord-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ==========================================================================
   404 ERROR PAGE STYLES
   ========================================================================== */

.main--error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: calc(100vh - 80px);
}

.error-card {
    max-width: 620px;
    width: 90%;
    margin: auto;
    padding: var(--space-3xl) var(--space-2xl);
    background: rgba(14, 14, 30, 0.45);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    text-align: center;
    box-shadow: var(--shadow-island), 0 0 60px rgba(var(--accent-primary-rgb), 0.1);
    position: relative;
    overflow: hidden;
    animation: cardEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Ambient internal card glow */
.error-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--accent-primary-rgb), 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.error-code {
    font-size: clamp(6rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, 
        var(--accent-tertiary) 0%, 
        var(--accent-primary) 50%, 
        var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-xs);
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(var(--accent-primary-rgb), 0.3));
    animation: glitchText 3s infinite alternate;
}

@keyframes glitchText {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(var(--accent-primary-rgb), 0.3));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(var(--accent-secondary-rgb), 0.5));
    }
}

.error-subtitle {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.error-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin: 0 auto var(--space-xl);
    line-height: 1.6;
    font-weight: 400;
}

/* --- Flatline CSS Audio Visualizer --- */
.flatline-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    margin-bottom: var(--space-xl);
}

.visualizer-bar {
    width: 4px;
    height: 6px;
    background: linear-gradient(to top, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-full);
    opacity: 0.3;
    transition: all 0.3s ease;
}

/* Simulate glitched audio flatline with micro pulsing */
.visualizer-bar:nth-child(1) { animation: staticPulse 1.2s ease-in-out infinite alternate; animation-delay: 0.1s; }
.visualizer-bar:nth-child(2) { animation: staticPulse 0.8s ease-in-out infinite alternate; animation-delay: 0.3s; }
.visualizer-bar:nth-child(3) { animation: staticPulse 1.5s ease-in-out infinite alternate; animation-delay: 0.5s; }
.visualizer-bar:nth-child(4) { animation: flatlinePulse 2s cubic-bezier(.08,.82,.17,1) infinite; }
.visualizer-bar:nth-child(5) { animation: flatlinePulse 2s cubic-bezier(.08,.82,.17,1) infinite; animation-delay: 0.1s; }
.visualizer-bar:nth-child(6) { animation: staticPulse 1.4s ease-in-out infinite alternate; animation-delay: 0.2s; }
.visualizer-bar:nth-child(7) { animation: staticPulse 0.9s ease-in-out infinite alternate; animation-delay: 0.4s; }
.visualizer-bar:nth-child(8) { animation: staticPulse 1.1s ease-in-out infinite alternate; animation-delay: 0.6s; }

@keyframes staticPulse {
    0% {
        transform: scaleY(0.5);
        opacity: 0.3;
    }
    100% {
        transform: scaleY(1.5);
        opacity: 0.8;
        background: linear-gradient(to top, var(--accent-tertiary), var(--accent-primary));
    }
}

@keyframes flatlinePulse {
    0%, 90%, 100% {
        transform: scaleY(0.4);
        opacity: 0.2;
    }
    45% {
        transform: scaleY(6);
        opacity: 1;
        filter: drop-shadow(0 0 8px var(--accent-secondary));
    }
    50% {
        transform: scaleY(0.2);
        opacity: 0.3;
    }
}

/* --- Glassmorphic Card Search --- */
.error-search-wrap {
    max-width: 440px;
    width: 100%;
    margin: 0 auto var(--space-xl);
    position: relative;
}

.error-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition: all var(--transition-base);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.error-search-input::placeholder {
    color: var(--text-tertiary);
}

.error-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(var(--accent-primary-rgb), 0.5);
    box-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.15),
                inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.error-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.error-search-wrap:focus-within .error-search-icon {
    color: var(--accent-secondary);
}

/* --- Gradient CTA Button --- */
.error-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 34px;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg,
            var(--accent-primary),
            var(--accent-secondary));
    border-radius: var(--radius-full);
    box-shadow: 0 4px 20px rgba(var(--accent-primary-rgb), 0.3);
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.error-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(var(--accent-primary-rgb), 0.55);
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.error-cta svg {
    transition: transform var(--transition-fast);
}

.error-cta:hover svg {
    transform: translateX(-4px);
}

/* Responsive spacing fixes */
@media (max-width: 576px) {
    .error-card {
        padding: var(--space-2xl) var(--space-md);
    }
    .main--error {
        padding-top: 100px;
    }
}

/* --- Settings Button & Modal Styles --- */

.nav__settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-base);
    margin-right: var(--space-md);
}

.nav__settings-btn:hover {
    color: var(--accent-secondary);
    background: var(--bg-glass-hover);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.nav__settings-btn svg {
    transition: transform var(--transition-slow);
}

.nav__settings-btn:hover svg {
    transform: rotate(90deg);
}

/* Modal Structure */
.settings-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.settings-modal--active {
    opacity: 1;
    pointer-events: all;
}

.settings-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 7, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.settings-modal__content {
    position: relative;
    z-index: 1;
    width: 92%;
    max-width: 560px;
    max-height: 85vh;
    background: rgba(14, 14, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-island), 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-spring);
}

.settings-modal--active .settings-modal__content {
    transform: scale(1) translateY(0);
}

.settings-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.settings-modal__title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
}

.settings-modal__title svg {
    color: var(--accent-primary);
}

.settings-modal__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-glass);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.settings-modal__close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.settings-modal__body {
    padding: var(--space-xl);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Scrollbar styling for settings body */
.settings-modal__body::-webkit-scrollbar {
    width: 6px;
}
.settings-modal__body::-webkit-scrollbar-track {
    background: transparent;
}
.settings-modal__body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

/* Settings Items */
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.settings-item__info {
    flex: 1;
}

.settings-item__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-item__desc {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    line-height: 1.4;
}

/* Language switcher inside settings modal override */
.settings-modal .lang-switcher {
    margin-right: 0;
    background: rgba(255, 255, 255, 0.05);
}

.settings-modal .lang-btn--active {
    color: var(--bg-primary) !important;
}

/* Switch Toggle Custom Checkbox */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-toggle__slider {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.switch-toggle__slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #a0a0b5;
    border-radius: 50%;
    transition: all var(--transition-base);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.switch-toggle input:checked + .switch-toggle__slider {
    background-color: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.5);
}

.switch-toggle input:checked + .switch-toggle__slider::before {
    transform: translateX(24px);
    background-color: var(--accent-success);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

/* Particle Density Switcher */
.density-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 3px;
}

.density-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.density-btn:hover {
    color: var(--text-secondary);
}

.density-btn--active {
    color: var(--bg-primary) !important;
    background: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Equalizer Section */
.settings-eq-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-xl);
}

.settings-eq-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.settings-eq-section__controls {
    transition: all var(--transition-base);
    opacity: 1;
    transform: translateY(0);
}

.settings-eq-section--disabled .settings-eq-section__controls {
    opacity: 0.3;
    pointer-events: none;
    transform: translateY(5px);
}

.settings-eq-preset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Custom Dropdown Selection */
.custom-select-wrapper {
    position: relative;
    width: 140px;
}

.custom-select {
    width: 100%;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.custom-select:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.custom-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(124, 92, 252, 0.2);
}

.custom-select-wrapper::after {
    content: "▼";
    font-size: 0.6rem;
    color: var(--text-tertiary);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Canvas Area */
.eq-canvas-container {
    background: rgba(3, 3, 8, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-md);
    overflow: hidden;
}

#eq-canvas {
    width: 100%;
    max-width: 500px;
    height: 240px;
    display: block;
    cursor: ns-resize;
}

.settings-eq-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.settings-eq-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.4;
    max-width: 320px;
}

.eq-reset-btn {
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    transition: all var(--transition-fast);
    text-transform: capitalize;
}

.eq-reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.eq-reset-btn:active {
    transform: scale(0.98);
}

/* Custom EQ Preset Dropdown Popover */
.eq-preset-dropdown {
    position: relative;
    user-select: none;
}

.eq-preset-dropdown__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    min-width: 155px;
    outline: none;
    gap: 0.5rem;
}

.eq-preset-dropdown__trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.eq-preset-dropdown--active .eq-preset-dropdown__trigger {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

.eq-preset-dropdown__trigger svg {
    opacity: 0.6;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease);
}

.eq-preset-dropdown--active .eq-preset-dropdown__trigger svg {
    transform: rotate(180deg);
    opacity: 1;
}

.eq-preset-dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: rgba(18, 18, 30, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    min-width: 170px;
    z-index: 200;
    overflow: hidden;
    animation: dropdownEnter 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: top right;
}

@keyframes dropdownEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.eq-preset-dropdown__option {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    color: rgba(238, 238, 245, 0.65);
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.15s var(--ease);
    letter-spacing: 0.01em;
}

.eq-preset-dropdown__option:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-left-color: rgba(255, 255, 255, 0.2);
}

.eq-preset-dropdown__option--active {
    background: rgba(0, 255, 136, 0.08) !important;
    color: var(--accent-success) !important;
    border-left-color: var(--accent-success) !important;
    font-weight: 600 !important;
}

/* --- Guide Layout & Styling --- */
.main--guide {
    padding: var(--space-4xl) var(--space-2xl) 140px;
    display: flex;
    justify-content: center;
}

.guide-container {
    width: 100%;
    max-width: 850px;
    animation: viewEnter 0.6s var(--ease-out) both;
}

.guide-header {
    margin-bottom: var(--space-2xl);
    position: relative;
}

.guide-back-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-base);
    margin-bottom: var(--space-lg);
}

.guide-back-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.guide-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: var(--space-md);
}

.guide-title-accent {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.guide-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.meta-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contributors-list {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.contributor-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    transition: all var(--transition-fast);
}

.contributor-tag:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.guide-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Alert Boxes */
.alert-box {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: rgba(14, 14, 30, 0.4);
    border: 1px solid transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.alert-box__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.alert-box__icon svg {
    width: 100%;
    height: 100%;
}

.alert-box__content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.alert-box__content > strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.alert-box__content p:not(:last-child) {
    margin-bottom: var(--space-sm);
}

.alert-box__content ul {
    padding-left: var(--space-lg);
    margin-top: var(--space-xs);
}

/* Types of alert boxes */
.alert-box--tip {
    border-color: rgba(var(--accent-secondary-rgb), 0.2);
    box-shadow: 0 0 24px rgba(var(--accent-secondary-rgb), 0.03);
}
.alert-box--tip .alert-box__icon { color: var(--accent-secondary); }
.alert-box--tip strong { color: var(--accent-secondary); }

.alert-box--warning {
    border-color: rgba(255, 107, 53, 0.2);
    box-shadow: 0 0 24px rgba(255, 107, 53, 0.03);
}
.alert-box--warning .alert-box__icon { color: var(--accent-warm); }
.alert-box--warning strong { color: var(--accent-warm); }

.alert-box--note {
    border-color: rgba(255, 255, 255, 0.15);
}
.alert-box--note .alert-box__icon { color: var(--text-secondary); }
.alert-box--note strong { color: var(--text-secondary); }

.alert-box--important {
    border-color: rgba(255, 60, 172, 0.2);
    box-shadow: 0 0 24px rgba(255, 60, 172, 0.03);
}
.alert-box--important .alert-box__icon { color: var(--accent-tertiary); }
.alert-box--important strong { color: var(--accent-tertiary); }

.alert-box--caution {
    border-color: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 24px rgba(255, 0, 0, 0.03);
}
.alert-box--caution .alert-box__icon { color: #ff3333; }
.alert-box--caution strong { color: #ff3333; }

.guide-link {
    color: var(--accent-secondary);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.guide-link:hover {
    color: var(--accent-primary);
}

/* Accordion Details */
.guide-details {
    background: rgba(20, 20, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--transition-base);
}

.guide-details[open] {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 30, 45, 0.5);
}

.guide-details__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.guide-details__summary::-webkit-details-marker {
    display: none;
}

.details-chevron {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-base);
    color: var(--text-secondary);
}

.guide-details[open] .details-chevron {
    transform: rotate(180deg);
    color: var(--accent-secondary);
}

.guide-details__content {
    padding: 0 var(--space-lg) var(--space-lg);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: var(--space-lg);
}

.guide-details__content ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.guide-details__content li {
    margin-bottom: var(--space-xs);
}

/* Step Cards */
.step-card {
    background: rgba(20, 20, 30, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: var(--space-2xl) var(--space-2xl) var(--space-2xl) 80px;
    position: relative;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.step-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-island), 0 0 40px rgba(var(--accent-primary-rgb), 0.05);
}

.step-badge {
    position: absolute;
    left: 20px;
    top: var(--space-2xl);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 16px rgba(var(--accent-primary-rgb), 0.3);
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.step-card p {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.step-list {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.step-list li {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.step-card .inline-alert {
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

/* UI Mockups */
.mockup-ui {
    background: #030308;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: var(--space-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.mockup-ui__title {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
}

.mockup-ui__title::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5f56;
    margin-right: 6px;
    box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
    margin-right: 38px;
}

.mockup-ui__body {
    padding: var(--space-lg);
    background: rgba(6, 6, 14, 0.3);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Drag upload mockup */
.drag-area {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: var(--space-xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.drag-icon {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
    transition: color var(--transition-base);
}

.drag-area:hover .drag-icon {
    color: var(--accent-secondary);
}

.drag-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.drag-subtext {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Mockup Menu list */
.mockup-menu {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 240px;
    background: #090915;
}

.mockup-menu-item {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.mockup-menu-item.active {
    background: rgba(124, 92, 252, 0.1);
    color: var(--accent-primary);
    font-weight: 600;
}

.mockup-menu-item span {
    font-size: 0.75rem;
}

/* Switch & Prefix row */
.mockup-switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 320px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mockup-switch {
    width: 42px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    position: relative;
}

.mockup-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.mockup-switch.active {
    background: var(--accent-success);
}

.mockup-switch.active::after {
    transform: translateX(20px);
    background: white;
}

.mockup-prefixes-row {
    display: flex;
    gap: var(--space-md);
    margin-top: 8px;
}

.prefix-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Timeline Mockup */
.timeline-mockup {
    position: relative;
    padding-top: 32px;
    background: #05050f;
    border-radius: var(--radius-sm);
}

.timeline-ruler {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-md);
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.timeline-track {
    height: 60px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.01);
}

.word-block {
    position: absolute;
    top: 15px;
    height: 30px;
    background: rgba(124, 92, 252, 0.15);
    border: 1px solid rgba(124, 92, 252, 0.4);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.word-block.active {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--accent-secondary);
    color: white;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ff3cac;
    z-index: 5;
    box-shadow: 0 0 8px #ff3cac;
}

.playhead::after {
    content: "";
    position: absolute;
    top: 0;
    left: -4px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #ff3cac;
}

/* Keybinds Grid */
.keybinds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.keybind-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.key-badge {
    display: inline-block;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-secondary);
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 6px;
    align-self: flex-start;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.key-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Credits preview */
.credits-preview {
    background: #080812;
    border-radius: var(--radius-sm);
    padding: var(--space-md);
}

.credits-line {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.credits-line.secondary {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.credits-line .accent {
    color: var(--accent-secondary);
}

/* XML Code block */
.xml-code {
    display: block;
    padding: var(--space-md);
    background: #040409;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #e5c07b;
    overflow-x: auto;
    margin-top: 10px;
}

/* Discord card */
.discord-card {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(88, 101, 242, 0.05));
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    margin-top: var(--space-lg);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.1);
}

.discord-card__logo {
    width: 60px;
    height: 60px;
    color: #5865F2;
    flex-shrink: 0;
}

.discord-card__logo svg {
    width: 100%;
    height: 100%;
}

.discord-card__content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.discord-card__content p {
    font-size: 0.88rem;
    color: rgba(238, 238, 245, 0.7);
    margin-bottom: var(--space-md);
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: #5865F2;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.4);
}

.discord-btn:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.6);
}

.guide-footer-note {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin-top: var(--space-3xl);
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-xl);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .step-card {
        padding: var(--space-xl) var(--space-lg) var(--space-lg) var(--space-lg);
    }
    .step-badge {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: var(--space-md);
    }
    .discord-card {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
    .main--guide {
        padding: var(--space-xl) var(--space-md) 100px;
    }
}


