:root {
    /* Core Theme Variables */
    --bg-dark: #050505;
    --glass-surface: rgb(255 255 255 / 3%);
    --glass-border: rgb(255 255 255 / 8%);

    /* Dynamic Accent Variables (Starts Pink) */
    --accent-rgb: 214, 9, 142;
    --accent: #d6098e;
    --accent-glow: rgb(var(--accent-rgb), 0.5);
    --accent-light: rgb(var(--accent-rgb), 0.15);
    --btn-grad-2: #ff4757;

    /* Authentic Premium Metallic Gold */
    --gold: #D4AF37;
    --gold-bright: #FBF5B7;
    --gold-dark: #AA771C;
    --gold-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #D4AF37 50%, #FBF5B7 75%, #AA771C 100%);
    --gold-glow: rgb(212 175 55 / 40%);
    --gold-light: rgb(212 175 55 / 12%);

    /* Text & UI */
    --text-main: #fff;
    --text-muted: #888;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;

    /* Sweep configuration */
    --sweep-color: rgb(255 255 255 / 15%);
    --sweep-color-gold: rgb(251 245 183 / 30%);
    --sweep-duration: 6s;
}

/* WHEN PRO IS ACTIVE: Turn Pink into Authentic Gold */
body.is-pro {
    --accent-rgb: 212, 175, 55;
    --accent: var(--gold);
    --accent-glow: var(--gold-glow);
    --accent-light: var(--gold-light);
    --btn-grad-2: var(--gold-dark);
}

/* Smooth transition for theme colors */
.logo span,
.btn-primary,
.value-display,
.preset-chip,
.toast-notification,
canvas {
    transition: background-color 0.5s, border-color 0.5s, color 0.5s, fill 0.5s, box-shadow 0.5s !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ABSOLUTELY NO SCROLLING & NO TEXT SELECTION */
html,
body {
    user-select: none;
    user-select: none;
    user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

/* Allow selection only in input fields and legal text */
input,
textarea,
.legal-content {
    user-select: text;
    user-select: text;
    user-select: text;
    user-select: text;
    touch-action: manipulation;
}

body {
    background-color: #050508;
    background-image:
        radial-gradient(at 10% 0%, rgb(150 20 100 / 15%) 0, transparent 40%),
        radial-gradient(at 90% 100%, rgb(20 40 120 / 15%) 0, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

/* ANIMATIONS */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 15px rgb(212 175 55 / 30%);
    }

    50% {
        box-shadow: 0 0 30px rgb(212 175 55 / 60%);
    }

    100% {
        box-shadow: 0 0 15px rgb(212 175 55 / 30%);
    }
}

@keyframes sharpSweep {
    0% {
        transform: translateX(-200%) skewX(-25deg) translateZ(0);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    15% {
        transform: translateX(350%) skewX(-25deg) translateZ(0);
        opacity: 0;
    }

    100% {
        transform: translateX(350%) skewX(-25deg) translateZ(0);
        opacity: 0;
    }
}

@keyframes cardSweep {
    0% {
        left: -100%;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    15% {
        left: 200%;
        opacity: 0;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

@keyframes textSweep {
    0% {
        background-position: -200% center;
    }

    20% {
        background-position: 200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.app-container {
    width: 100%;
    max-width: 950px;
    height: calc(95vh - 66px);
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

/* UPLOAD */
.upload-overlay {
    position: absolute;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgb(5 5 5 / 98%);
    transition: opacity 0.4s ease;
}

.upload-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.drop-zone {
    width: 80%;
    max-width: 300px;
    height: 200px;
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-align: center;
    padding: 20px;
    background: rgb(255 255 255 / 1%);
    position: relative;
    z-index: 3001;
    transition: all 0.3s ease;
}

.drop-zone:hover,
.drop-zone.dragover,
.upload-overlay.dragover .drop-zone {
    border-color: rgb(255 255 255 / 30%);
    background: rgb(255 255 255 / 3%);
}

.drop-zone p {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 0.9rem;
    pointer-events: none;
}

.icon-upload {
    width: 40px;
    height: 40px;
    fill: var(--text-main);
    opacity: 0.8;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drop-zone:hover .icon-upload,
.upload-overlay.dragover .icon-upload {
    opacity: 1;
}

input[type="file"] {
    display: none;
}

/* HEADER */
.header {
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    height: 70px;
    z-index: 2;
    position: relative;
}

.logo {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 1.2rem;
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

#fileName {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 130px;
}

/* Animated Equalizer Bars */
.file-info-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.playing-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 9px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playing-bars.visible {
    opacity: 1;
}

.playing-bars .bar {
    width: 2.5px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: bounceBar 1.3s ease-in-out infinite;
    transform-origin: bottom;
    animation-play-state: paused;
    transition: background-color 0.5s;
}

.playing-bars .bar1 {
    height: 100%;
    animation-delay: 0s;
}

.playing-bars .bar2 {
    height: 100%;
    animation-delay: -0.4s;
}

.playing-bars .bar3 {
    height: 100%;
    animation-delay: -0.8s;
}

.playing-bars.playing .bar {
    animation-play-state: running;
}

@keyframes bounceBar {

    0%,
    100% {
        transform: scaleY(0.3);
    }

    50% {
        transform: scaleY(1);
    }
}

/* PREMIUM BADGE */
.premium-badge-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgb(212 175 55 / 15%), rgb(212 175 55 / 5%));
    border: 1px solid rgb(212 175 55 / 35%);
    color: var(--gold);
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.premium-badge-btn svg {
    width: 13px;
    height: 13px;
    fill: var(--gold);
    flex-shrink: 0;
}

.premium-badge-btn:hover {
    background: linear-gradient(135deg, rgb(212 175 55 / 25%), rgb(212 175 55 / 10%));
    border-color: rgb(212 175 55 / 70%);
}

.pro-indicator {
    display: none;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgb(212 175 55 / 20%), rgb(212 175 55 / 8%));
    border: 1px solid rgb(212 175 55 / 50%);
    color: var(--gold);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pro-indicator.visible {
    display: flex;
    animation: pulseGlow 2s infinite alternate;
}

.pro-indicator svg {
    width: 12px;
    height: 12px;
    fill: var(--gold);
}

/* WORKSPACE */
.workspace {
    flex: 1;
    position: relative;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    justify-content: space-between;
    z-index: 2;
}

.visualizer-container {
    height: 80px;
    background: rgb(0 0 0 / 30%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
    box-shadow: inset 0 0 20px rgb(0 0 0 / 50%);
}

#visualizerCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.interface-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 16px;
    flex: 1;
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    flex-shrink: 0;
}

.full-width-card {
    grid-column: 1 / -1;
}

#proControlsGrid {
    grid-template-columns: repeat(3, 1fr);
}

.control-card {
    background: rgb(255 255 255 / 2%);
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: visible;
    backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* PREMIUM LOCKED CARD */
.control-card.premium-locked {
    background: rgb(212 175 55 / 3%);
    border-color: rgb(212 175 55 / 15%);
}

.control-card.premium-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: rgb(5 5 5 / 55%);
    backdrop-filter: blur(2px);
    z-index: 5;
    pointer-events: none;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 10;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lock-overlay:hover {
    background: rgb(212 175 55 / 8%);
}

.lock-overlay svg {
    width: 22px;
    height: 22px;
    fill: var(--gold);
    opacity: 0.9;
}

.lock-overlay span {
    font-size: 0.72rem;
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pro-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    background: var(--gold-gradient);
    border: none;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 8px var(--gold-glow);
}

.control-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

input[type="range"] {
    appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
    touch-action: none;
    height: 30px;
    margin: 0;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--text-main);
    margin-top: -8px;
    cursor: pointer;
    border: 2px solid rgb(0 0 0 / 20%);
}

.volume-slider::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    margin-top: -6px;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: rgb(255 255 255 / 10%);
    border-radius: 2px;
}

.value-display {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 15%);
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

body.is-pro .value-display {
    color: var(--gold);
    background: var(--gold-light);
    border-color: rgb(212 175 55 / 40%);
    text-shadow: 0 0 8px rgb(212 175 55 / 40%);
}

.presets-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.preset-chip {
    background: rgb(255 255 255 / 5%);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
}

.preset-chip:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

.delete-preset {
    opacity: 0.5;
    font-size: 1.2em;
    padding: 0 4px;
    line-height: 0.5;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 400px;
}

input[type="text"] {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    width: 100%;
    font-size: 14px;
    min-height: 36px;
}

button.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    min-height: 36px;
}

/* EXPORT */
.export-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    gap: 20px;
    flex-shrink: 0;
    margin-top: auto;
}

.btn-primary {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--btn-grad-2));
    border: 1px solid rgb(255 255 255 / 20%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
}

.is-pro .btn-primary svg {
    fill: #000;
}

.btn-primary svg {
    width: 24px;
    height: 24px;
    fill: white;
    z-index: 1;
    position: relative;
}

.btn-primary:disabled {
    background: #2a2a2a;
    border-color: #444;
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-reset {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgb(255 255 255 / 3%);
    border: 1px solid rgb(255 255 255 / 10%);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-muted);
}

.btn-reset svg {
    width: 18px;
    height: 18px;
    fill: currentcolor;
}

/* PLAYER BAR & METERS */
.player-bar {
    background: rgb(0 0 0 / 60%);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 2;
    position: relative;
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--text-main);
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.is-pro .play-btn {
    background: var(--gold);
}

.timeline {
    flex: 1;
    display: flex;
    align-items: center;
    height: 40px;
    position: relative;
}

#waveformCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    touch-action: none;
}

.time-info {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 90px;
    text-align: right;
}

.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 130px;
    padding-left: 15px;
    border-left: 1px solid var(--glass-border);
}

.volume-icon {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

/* --- STUDIO RMS METER CSS --- */
.meter-container {
    width: 60px;
    height: 8px;
    background: rgb(0 0 0 / 50%);
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    margin-left: 5px;
}

.meter-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);

    /* No CSS transition, JS handles the precise physics */
}

.meter-peak {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ef4444;
    right: 100%;

    /* No CSS transition, JS handles peak hold/falloff */
}

/* TOAST */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgb(10 10 10 / 95%);
    border: 1px solid var(--accent);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 5px 20px rgb(0 0 0 / 50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 10000;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* PREMIUM OVERLAY */
.premium-overlay {
    position: absolute;
    inset: 0;
    z-index: 4000;
    background: rgb(5 5 5 / 95%);
    backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    overflow-y: auto;
    scrollbar-width: thin;
}

.premium-overlay::-webkit-scrollbar {
    width: 6px;
}

.premium-overlay::-webkit-scrollbar-track {
    background: transparent;
}

.premium-overlay::-webkit-scrollbar-thumb {
    background: rgb(255 255 255 / 12%);
    border-radius: 3px;
}

.premium-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ===================== PREMIUM OVERLAY REDESIGN ===================== */

.premium-inner {
    width: 100%;
    max-width: 720px;
    padding: 28px 36px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
}

/* HEADER */
.premium-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.premium-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
    padding: 5px 14px;
    border: 1px solid rgb(212 175 55 / 25%);
    border-radius: 999px;
    background: rgb(212 175 55 / 7%);
}

.premium-eyebrow svg {
    width: 12px;
    height: 12px;
    fill: currentcolor;
}

.premium-h1 {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-main);
    margin-bottom: 10px;
}

.premium-h1 span {
    background: var(--gold-gradient);
    background-size: 200% auto;
    color: transparent;
    background-clip: text;
    background-clip: text;
    animation: textSweep var(--sweep-duration) linear infinite;
}

.premium-subtitle {
    font-size: 0.9rem;
    color: rgb(255 255 255 / 55%);
    max-width: 420px;
    line-height: 1.6;
}

.close-premium {
    position: absolute;
    top: 0;
    right: 0;
    background: rgb(255 255 255 / 4%);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.close-premium:hover {
    background: rgb(255 255 255 / 9%);
    color: var(--text-main);
}

.close-premium svg {
    width: 17px;
    height: 17px;
    fill: currentcolor;
}

/* PLANS GRID — 2 columns */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    width: 100%;
    margin-bottom: 22px;
    flex-shrink: 0;
}

/* BASE CARD */
.plan-card {
    position: relative;
    border-radius: 22px;
    padding: 26px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 0;
    cursor: pointer;
    overflow: hidden;
    transform: translateZ(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.plan-card:hover {
    transform: translateY(-3px);
}

/* Sweep shimmer */
.plan-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--sweep-color), transparent);
    transform: skewX(-22deg);
    animation: cardSweep var(--sweep-duration) infinite;
    pointer-events: none;
    z-index: 3;
}

/* Ambient background glow blobs inside cards */
.plan-card-bg-glow {
    display: none;
}

/* Free card */
.plan-card--free {
    background: rgb(255 255 255 / 2%);
    border: 1px solid rgb(255 255 255 / 9%);
    box-shadow: 0 24px 60px rgb(0 0 0 / 35%);
}

.plan-card--free:hover {
    border-color: rgb(124 124 249 / 35%);
    box-shadow: 0 28px 70px rgb(0 0 0 / 40%);
}

/* Pro / Lifetime card */
.plan-card--pro {
    background: linear-gradient(175deg, rgb(30 22 6 / 65%) 0%, rgb(15 12 4 / 45%) 100%);
    border: 1px solid rgb(212 175 55 / 35%);
    box-shadow: 0 24px 60px rgb(0 0 0 / 40%);
}

.plan-card--pro::after {
    background: linear-gradient(to right, transparent, var(--sweep-color-gold), transparent);
    animation-delay: 0.7s;
}

.plan-card--pro:hover,
.plan-card--pro.selected {
    border-color: rgb(212 175 55 / 65%);
    box-shadow: 0 32px 80px rgb(0 0 0 / 50%);
}

.plan-card--free.selected {
    border-color: rgb(124 124 249 / 50%);
    box-shadow: 0 28px 70px rgb(0 0 0 / 40%);
}

/* Popular badge */
.popular-tag {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #1a1000;
    background: var(--gold-gradient);
    padding: 4px 11px;
    border-radius: 999px;
    z-index: 10;
    box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
}

.popular-tag svg {
    width: 9px;
    height: 9px;
    fill: currentcolor;
}

/* Card content z-index */
.plan-card>*:not(.plan-card-bg-glow, .popular-tag) {
    position: relative;
    z-index: 2;
}

/* Plan top block */
.plan-top {
    margin-bottom: 16px;
}

.plan-tier-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.plan-tier-label--free {
    color: rgb(165 165 252 / 75%);
}

.plan-tier-label--pro {
    color: var(--gold);
}

.plan-price-block {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-bottom: 5px;
}

.plan-curr {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgb(255 255 255 / 60%);
    margin-bottom: 4px;
}

.plan-curr--gold {
    color: rgb(212 175 55 / 80%);
}

.plan-amount {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text-main);
}

.plan-amount--gold {
    background: var(--gold-gradient);
    background-size: 200% auto;
    color: transparent;
    background-clip: text;
    background-clip: text;
    animation: textSweep var(--sweep-duration) linear infinite;
}

.plan-recurrence {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(255 255 255 / 35%);
}

.plan-recurrence--gold {
    color: rgb(212 175 55 / 60%);
}

/* Divider */
.plan-divider {
    height: 1px;
    background: rgb(255 255 255 / 6%);
    margin: 16px 0;
}

.plan-divider--gold {
    background: rgb(212 175 55 / 20%);
}

/* Features */
.plan-features {
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.815rem;
    font-weight: 400;
    color: rgb(255 255 255 / 70%);
    line-height: 1.3;
}

.feature-item svg {
    width: 14px;
    height: 14px;
    fill: currentcolor;
    flex-shrink: 0;
}

.fi-yes {
    color: rgb(255 255 255 / 72%);
}

.fi-yes svg {
    fill: rgb(90 220 130 / 85%);
}

.fi-no {
    color: rgb(255 255 255 / 22%);
    text-decoration: line-through;
    text-decoration-color: rgb(255 255 255 / 10%);
}

.fi-no svg {
    fill: rgb(255 255 255 / 18%);
}

.fi-gold {
    color: rgb(255 255 255 / 88%);
}

.fi-gold svg {
    fill: var(--gold);
}

/* CTA container */
.cta-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-subscribe {
    width: 100%;
    padding: 15px 24px;
    border-radius: 14px;
    border: 1px solid rgb(212 175 55 / 60%);
    background: var(--gold-gradient);
    color: #1a0a00;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.btn-subscribe:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-subscribe:active {
    transform: translateY(0);
    opacity: 1;
}

.btn-subscribe-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-subscribe-label {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.btn-subscribe-sub {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.55;
    letter-spacing: 0.4px;
}

.btn-subscribe-price {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    opacity: 0.85;
    flex-shrink: 0;
}

.btn-subscribe svg {
    width: 17px;
    height: 17px;
    fill: currentcolor;
    flex-shrink: 0;
    opacity: 0.85;
}

.btn-subscribe-free {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.2s, text-decoration 0.2s;
    text-align: center;
    width: auto;
    margin-top: 4px;
}

.btn-subscribe-free:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Trust line below CTA */
.cta-trust {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.72rem;
    color: rgb(255 255 255 / 28%);
    font-weight: 400;
}

.cta-trust svg {
    width: 11px;
    height: 11px;
    fill: none;
    stroke: currentcolor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-right: 3px;
    vertical-align: -1px;
}

.cta-trust span {
    display: inline-flex;
    align-items: center;
}

.cta-trust-dot {
    opacity: 0.3;
}

/* Responsive */
@media (width <=540px) {
    .premium-inner {
        padding: 20px 18px 24px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
    }

    .premium-h1 {
        font-size: 1.7rem;
    }

    .plan-amount {
        font-size: 2.4rem;
    }
}

/* NEW DESIGNED FOOTER */
.site-footer {
    width: 100%;
    max-width: 950px;
    height: 50px;
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 10;
    box-shadow: none;
}

.footer-links,
.footer-social,
.footer-copyright {
    display: flex;
    align-items: center;
    flex: 1;
}

.footer-links {
    gap: 16px;
    justify-content: flex-start;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-copyright {
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.7;
    white-space: nowrap;
}

.footer-social {
    justify-content: flex-end;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--accent);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: currentcolor;
}

/* ===================== EXPORT MODAL ===================== */
.export-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: rgb(12 12 16 / 97%);
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 28px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-shadow: 0 40px 80px rgb(0 0 0 / 70%), 0 0 0 1px rgb(255 255 255 / 4%) inset;
    backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    animation: exportModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes exportModalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.export-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgb(255 255 255 / 8%);
    background: rgb(255 255 255 / 4%);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.export-close:hover {
    background: rgb(255 255 255 / 10%);
    color: var(--text-main);
}

.export-close svg {
    width: 16px;
    height: 16px;
    fill: currentcolor;
}

.export-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.export-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-light), rgb(0 0 0 / 0%));
    border: 1px solid rgb(var(--accent-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.export-icon-wrap svg {
    width: 22px;
    height: 22px;
    fill: var(--accent);
}

.export-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 3px;
    font-weight: 600;
}

.export-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

/* Format cards */
.export-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.export-card {
    position: relative;
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: 20px;
    background: rgb(255 255 255 / 2%);
    padding: 20px 18px;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    transition: border-color 0.25s, background 0.25s, transform 0.15s;
}

.export-card:hover {
    border-color: rgb(var(--accent-rgb), 0.5);
    background: rgb(var(--accent-rgb), 0.05);
    transform: translateY(-2px);
}

.export-card:active {
    transform: translateY(0);
}

.export-card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.export-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.export-format-badge {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 4px 10px;
    border-radius: 8px;
}

.export-format-badge--wav {
    background: rgb(var(--accent-rgb), 0.15);
    color: var(--accent);
    border: 1px solid rgb(var(--accent-rgb), 0.35);
}

.export-format-badge--mp3 {
    background: rgb(255 255 255 / 6%);
    color: var(--text-muted);
    border: 1px solid rgb(255 255 255 / 10%);
}

/* Quality dots */
.export-quality-dots {
    display: flex;
    gap: 3px;
    align-items: center;
}

.dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.dot--full {
    background: var(--accent);
    opacity: 0.85;
}

.dot--half {
    background: var(--accent);
    opacity: 0.35;
}

.dot--empty {
    background: rgb(255 255 255 / 12%);
}

.export-card-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.export-card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.export-specs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.spec-tag {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgb(255 255 255 / 5%);
    border: 1px solid rgb(255 255 255 / 7%);
    color: rgb(255 255 255 / 45%);
    text-transform: uppercase;
}

/* Hover glow blob */
.export-card-glow {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    opacity: 0;
    background: radial-gradient(ellipse at 50% 120%, rgb(var(--accent-rgb), 0.18) 0%, transparent 70%);
    transition: opacity 0.3s;
    pointer-events: none;
}

.export-card:hover .export-card-glow {
    opacity: 1;
}

/* Sweep shimmer on WAV card */
.export-card#exportWavBtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgb(255 255 255 / 4%), transparent);
    transform: skewX(-20deg);
    animation: exportCardSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes exportCardSweep {
    0% {
        left: -60%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    40% {
        left: 130%;
        opacity: 0;
    }

    100% {
        left: 130%;
        opacity: 0;
    }
}

@media (width <=768px) {
    .export-modal {
        padding: 24px;
        gap: 20px;
        margin: 16px;
        border-radius: 20px;
    }

    .export-cards {
        grid-template-columns: 1fr;
    }

    .export-title {
        font-size: 1.1rem;
    }
}

/* ===================== LEGAL OVERLAY (REDESIGNED) ===================== */
.legal-overlay {
    position: absolute;
    inset: 0;
    z-index: 4000;
    background: rgb(4 4 8 / 97%);
    backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    overflow: hidden;
}

.legal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Progress bar at top */
.legal-progress-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgb(255 255 255 / 5%);
    z-index: 10;
}

.legal-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--btn-grad-2));
    transition: width 0.1s linear;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Close button */
.legal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgb(255 255 255 / 8%);
    background: rgb(255 255 255 / 4%);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.legal-close-btn:hover {
    background: rgb(255 255 255 / 10%);
    color: var(--text-main);
}

.legal-close-btn svg {
    width: 18px;
    height: 18px;
    fill: currentcolor;
}

/* Full-bleed inner */
.legal-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Two-column layout */
.legal-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ---- SIDEBAR ---- */
.legal-sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 40px 0 24px 32px;
    border-right: 1px solid rgb(255 255 255 / 5%);
    display: flex;
    flex-direction: column;
    gap: 28px;
    overflow: hidden;
}

.legal-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.2px;
}

.legal-brand-icon {
    width: 18px;
    height: 18px;
    fill: var(--accent);
    flex-shrink: 0;
}

.legal-sidebar-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgb(255 255 255 / 25%);
    font-weight: 700;
}

.legal-toc {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px 7px 0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    transition: color 0.2s, background 0.2s;
    position: relative;
    cursor: pointer;
}

.toc-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.25s ease, box-shadow 0.25s;
}

.toc-item.active {
    color: var(--text-main);
}

.toc-item.active::before {
    height: 20px;
    box-shadow: 0 0 8px var(--accent-glow);
}

.toc-item:hover {
    color: rgb(255 255 255 / 75%);
}

.toc-num {
    font-size: 0.6rem;
    font-weight: 800;
    color: rgb(255 255 255 / 18%);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toc-item.active .toc-num {
    color: var(--accent);
}

.toc-text {
    line-height: 1.3;
}

.legal-sidebar-footer {
    margin-top: auto;
}

.legal-sidebar-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: rgb(255 255 255 / 20%);
}

.legal-sidebar-date svg {
    width: 12px;
    height: 12px;
    fill: currentcolor;
    flex-shrink: 0;
}

/* ---- MAIN CONTENT ---- */
.legal-main {
    flex: 1;
    overflow-y: auto;
    padding: 40px 48px 60px;
    scroll-behavior: smooth;
    user-select: text;
    user-select: text;
}

/* Scrollbar */
.legal-main::-webkit-scrollbar {
    width: 4px;
}

.legal-main::-webkit-scrollbar-track {
    background: transparent;
}

.legal-main::-webkit-scrollbar-thumb {
    background: rgb(255 255 255 / 8%);
    border-radius: 4px;
}

.legal-main::-webkit-scrollbar-thumb:hover {
    background: rgb(255 255 255 / 15%);
}

/* Doc header */
.legal-doc-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgb(255 255 255 / 6%);
}

.legal-doc-eyebrow {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
}

.legal-doc-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    margin-bottom: 14px;
    line-height: 1;
}

.legal-doc-intro {
    font-size: 0.88rem;
    color: rgb(255 255 255 / 50%);
    line-height: 1.7;
    max-width: 560px;
}

/* Sections */
.tos-section {
    margin-bottom: 44px;
    scroll-margin-top: 20px;
}

.tos-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.tos-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgb(var(--accent-rgb), 0.1);
    border: 1px solid rgb(var(--accent-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.tos-icon-wrap svg {
    width: 16px;
    height: 16px;
    fill: var(--accent);
}

.tos-icon-wrap--warn {
    background: rgb(239 68 68 / 10%);
    border-color: rgb(239 68 68 / 25%);
}

.tos-icon-wrap--warn svg {
    fill: #f87171;
}

.tos-section-num {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgb(255 255 255 / 22%);
    font-weight: 700;
    margin-bottom: 3px;
}

.tos-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.tos-section>p {
    font-size: 0.83rem;
    color: rgb(255 255 255 / 60%);
    line-height: 1.75;
    margin-bottom: 14px;
    max-width: 600px;
}

/* Highlight cards row (section 1) */
.tos-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.tos-highlight-card {
    background: rgb(255 255 255 / 2%);
    border: 1px solid rgb(255 255 255 / 6%);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.tos-highlight-card:hover {
    border-color: rgb(var(--accent-rgb), 0.25);
    background: rgb(var(--accent-rgb), 0.03);
}

.tos-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgb(var(--accent-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tos-card-icon svg {
    width: 14px;
    height: 14px;
    fill: var(--accent);
}

.tos-card-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
}

.tos-card-text {
    font-size: 0.73rem;
    color: rgb(255 255 255 / 45%);
    line-height: 1.6;
}

/* Lists */
.tos-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 600px;
}

.tos-list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.82rem;
    color: rgb(255 255 255 / 58%);
    line-height: 1.7;
}

.tos-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
}

.tos-list strong {
    color: rgb(255 255 255 / 80%);
}

/* No-list (red dots) */
.tos-list--no li::before {
    background: #f87171;
}

/* Warning box */
.tos-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgb(239 68 68 / 6%);
    border: 1px solid rgb(239 68 68 / 20%);
    font-size: 0.78rem;
    color: #fca5a5;
    line-height: 1.6;
    max-width: 560px;
}

.tos-warning-box svg {
    width: 15px;
    height: 15px;
    fill: #f87171;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Doc footer */
.legal-doc-footer {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px dashed rgb(255 255 255 / 7%);
}

.legal-doc-footer-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: rgb(255 255 255 / 30%);
}

.legal-doc-footer-inner svg {
    width: 14px;
    height: 14px;
    fill: currentcolor;
    flex-shrink: 0;
}

.legal-doc-footer-inner a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

.legal-doc-footer-inner a:hover {
    opacity: 0.7;
}

/* Mobile */
@media (width <=768px) {
    .legal-sidebar {
        display: none;
    }

    .legal-main {
        padding: 24px 20px 48px;
    }

    .legal-doc-title {
        font-size: 1.4rem;
    }

    .tos-cards-row {
        grid-template-columns: 1fr;
    }

    .legal-close-btn {
        top: 10px;
        right: 10px;
    }
}

/* MOBILE RESPONSIVENESS */
@media (width <=768px) {
    body {
        gap: 0;
        justify-content: flex-start;
    }

    .app-container {
        height: calc(100dvh - 50px);
        border-radius: 0;
        border: none;
    }

    .header {
        height: 60px;
        padding: 0 16px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .workspace {
        padding: 12px 12px 130px;
        gap: 12px;
        justify-content: space-evenly;
    }

    .interface-wrapper {
        gap: 12px;
    }

    .controls-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .full-width-card {
        grid-column: 1 / -1;
    }

    #proControlsGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #proControlsGrid .control-card:nth-child(3) {
        grid-column: 1 / -1;
    }

    .control-card {
        padding: 10px;
    }

    .control-header {
        margin-bottom: 6px;
        font-size: 0.75rem;
    }

    .value-display {
        font-size: 0.9rem;
    }

    .visualizer-container {
        height: 50px;
    }

    .export-section {
        padding: 5px 0;
        gap: 15px;
    }

    .btn-primary {
        width: 50px;
        height: 50px;
    }

    .btn-primary svg {
        width: 20px;
        height: 20px;
    }

    .player-bar {
        position: fixed;
        bottom: 50px;
        left: 0;
        right: 0;
        height: 70px;
        padding: 0 16px;
        gap: 10px;
    }

    .play-btn {
        order: 2;
        margin: 8px auto 0;
        width: 52px;
        height: 52px;
    }

    .volume-wrapper {
        display: none;
    }

    .meter-container {
        display: none;
    }

    /* Optional: Hide meter on mobile to save space */
    .time-info {
        font-size: 0.7rem;
        min-width: 70px;
    }

    .premium-inner {
        padding: 16px;
        justify-content: space-evenly;
        height: auto;
        min-height: 100%;
    }

    .close-premium {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }

    .premium-header {
        margin-bottom: 12px;
    }

    .premium-h1 {
        font-size: 2rem;
        margin-bottom: 4px;
    }

    .premium-subtitle {
        display: none;
    }

    .features-bar {
        display: none;
    }

    .billing-toggle {
        margin-bottom: 12px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 16px;
    }

    .plan-card {
        padding: 12px 16px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .plan-card.popular {
        transform: none;
    }

    .plan-features {
        display: none;
    }

    .popular-tag {
        top: auto;
        bottom: -8px;
        right: 16px;
        font-size: 0.5rem;
        padding: 2px 6px;
    }

    .plan-top {
        display: grid;
        grid-template-areas:
            "label price"
            "recurrence price";
        grid-template-columns: 1fr auto;
        align-items: center;
        width: 100%;
        margin-bottom: 0;
        gap: 2px 12px;
    }

    .plan-tier-label {
        grid-area: label;
        margin-bottom: 0;
    }

    .plan-price-block {
        grid-area: price;
        margin-bottom: 0;
        justify-content: flex-end;
    }

    .plan-recurrence {
        grid-area: recurrence;
    }

    .plan-curr {
        font-size: 0.9rem;
    }

    .plan-amount {
        font-size: 1.5rem;
    }

    .plan-divider {
        display: none;
    }

    .cta-container {
        max-width: 100%;
    }

    .btn-subscribe {
        padding: 12px;
        font-size: 1rem;
    }

    .site-footer {
        max-width: 100%;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--glass-border);
        padding: 0 20px;
        background: #050505;
    }

    .footer-copyright {
        display: none;
    }

    .legal-inner {
        height: 95%;
        border-radius: 0;
        border: none;
    }
}

@media (width <=350px) {

    .controls-grid,
    #proControlsGrid {
        gap: 6px;
    }

    .control-card {
        padding: 8px;
    }

    .premium-h1 {
        font-size: 1.6rem;
    }

    .plan-amount {
        font-size: 1.2rem;
    }
}

/* ===================== ACCOUNT & DASHBOARD CSS ===================== */

/* .account-btn defined later around line 3050 */

/* AUTH MODAL */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 85%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 40px rgb(0 0 0 / 50%);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.auth-overlay.active .auth-modal {
    transform: translateY(0);
}

.close-auth {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.close-auth svg {
    width: 24px;
    height: 24px;
    fill: var(--text-main);
}

.close-auth:hover {
    opacity: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-group-auth {
    margin-bottom: 16px;
}

.input-group-auth label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group-auth input {
    width: 100%;
    background: rgb(255 255 255 / 5%);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group-auth input:focus {
    border-color: var(--accent);
}

.btn-auth-submit {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-auth-submit:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 15px var(--accent-glow);
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-switch button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
    margin-left: 4px;
}

/* DASHBOARD MODAL */
.dashboard-overlay {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 90%);
    backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dashboard-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-inner {
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgb(0 0 0 / 60%);
    transform: scale(0.98);
    transition: transform 0.3s ease;
}

.dashboard-overlay.active .dashboard-inner {
    transform: scale(1);
}

.close-dashboard {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgb(255 255 255 / 10%);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.close-dashboard svg {
    width: 20px;
    height: 20px;
    fill: var(--text-main);
}

.close-dashboard:hover {
    background: rgb(255 255 255 / 20%);
}

/* Sidebar */
.dashboard-sidebar {
    width: 260px;
    background: rgb(255 255 255 / 2%);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 30px 0;
}

.user-profile-brief {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 30px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
    position: relative;
}

.sidebar-banner {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, rgb(var(--accent-rgb), 0.2), rgb(var(--accent-rgb), 0.05));
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: -40px;
    border-top-left-radius: 24px;
}

body.is-pro .sidebar-banner {
    background: linear-gradient(135deg, rgb(212 175 55 / 20%), rgb(212 175 55 / 5%));
}

.user-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent), var(--btn-grad-2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    border: 4px solid var(--glass-surface);
    box-shadow: 0 5px 15px rgb(0 0 0 / 50%);
    z-index: 2;
    margin-bottom: 12px;
}

.user-info-brief {
    text-align: center;
    margin-bottom: 15px;
}

.user-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-stats {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
    padding: 0 20px;
}

.stat-box {
    background: rgb(255 255 255 / 3%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    flex: 1;
}

.stat-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
    flex: 1;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: left;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentcolor;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgb(255 255 255 / 5%);
}

.nav-item.active {
    color: white;
    background: var(--accent-light);
    border: 1px solid rgb(var(--accent-rgb), 0.3);
}

.sidebar-footer {
    padding: 0 24px;
}

.btn-logout {
    background: transparent;
    border: none;
    color: #ff4757;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.btn-logout svg {
    width: 18px;
    height: 18px;
    fill: currentcolor;
}

.btn-logout:hover {
    opacity: 1;
}

/* Content Area */
.dashboard-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.dash-tab {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dash-tab.active {
    display: block;
}

.tab-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.tab-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tab-header-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--text-main);
}

.tab-header h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tab-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Base settings-card styles are fully defined in the Enhanced Dashboard section below */

.setting-row {
    margin-bottom: 20px;
}

.setting-row label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* download-item, dl-info, dl-meta, dl-badge, empty-state — fully defined in enhanced section below */

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===================== ACCOUNT & DASHBOARD CSS ===================== */

.account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgb(255 255 255 / 5%);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 12px 6px 6px;
    border-radius: 24px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

.account-btn:hover {
    background: rgb(255 255 255 / 10%);
    border-color: rgb(255 255 255 / 30%);
    transform: translateY(-1px);
}

.account-btn:active {
    transform: translateY(0);
}

.account-btn-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgb(255 255 255 / 8%);
    border: 1px solid var(--glass-border);
    position: relative;
}

.account-btn-guest-icon {
    width: 15px;
    height: 15px;
    fill: var(--text-muted);
    transition: opacity 0.2s ease;
}

.account-btn-initial {
    display: none;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), rgb(var(--accent-rgb), 0.6));
}

.account-btn.has-user .account-btn-guest-icon {
    display: none;
}

.account-btn.has-user .account-btn-avatar {
    border-color: transparent;
}

.account-btn.has-user .account-btn-initial {
    display: flex;
}

.account-btn-chevron {
    width: 12px;
    height: 12px;
    fill: var(--text-muted);
    transition: transform 0.2s ease;
}

.account-btn:hover .account-btn-chevron {
    transform: translateY(1px);
}

/* ===================== ENHANCED DASHBOARD STYLES ===================== */

/* --- Sidebar Banner Gradient Enhancement --- */
.sidebar-banner {
    background: linear-gradient(135deg,
            rgb(var(--accent-rgb), 0.35) 0%,
            rgb(var(--accent-rgb), 0.12) 50%,
            transparent 100%) !important;
    position: relative;
    overflow: hidden;
}

.sidebar-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / 8%) 50%, transparent 100%);
    animation: bannerSheen 4s ease-in-out infinite;
}

@keyframes bannerSheen {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* --- Avatar Wrap --- */
.avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

/* --- Avatar Pro Badge --- */
.avatar-pro-badge {
    position: absolute;
    bottom: 10px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--glass-surface);
    box-shadow: 0 2px 8px var(--gold-glow);
    z-index: 5;
    animation: proGlow 2s ease-in-out infinite alternate;
}

.avatar-pro-badge.visible {
    display: flex;
}

.avatar-pro-badge svg {
    width: 12px;
    height: 12px;
    fill: #1a1000;
}

@keyframes proGlow {
    from {
        box-shadow: 0 2px 8px var(--gold-glow);
    }

    to {
        box-shadow: 0 2px 20px var(--gold-glow), 0 0 8px var(--gold);
    }
}

/* --- Avatar Edit Button --- */
.avatar-edit-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgb(0 0 0 / 0%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 3;
}

.avatar-wrap:hover .avatar-edit-btn {
    opacity: 1;
    background: rgb(0 0 0 / 55%);
}

.avatar-edit-btn svg {
    width: 22px;
    height: 22px;
    fill: white;
}

/* --- User Avatar Enhancement --- */
.user-avatar {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar-wrap:hover .user-avatar {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgb(var(--accent-rgb), 0.5);
}

/* --- Stat Boxes Enhancement --- */
.stat-icon {
    width: 18px;
    height: 18px;
    fill: var(--accent);
    display: block;
    margin: 0 auto 4px;
    opacity: 0.85;
    transition: transform 0.2s;
}

.stat-box:hover .stat-icon {
    transform: scale(1.15);
}

.stat-box--wide {
    flex: 1.5;
}

.stat-num {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* --- Nav Item Enhancement --- */
.nav-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item-icon svg {
    width: 20px;
    height: 20px;
    fill: currentcolor;
}

.nav-item-label {
    flex: 1;
    text-align: left;
}

.nav-item-count {
    background: rgb(var(--accent-rgb), 0.25);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    transition: background 0.2s;
}

.nav-item.active .nav-item-count {
    background: rgb(var(--accent-rgb), 0.4);
}

/* --- Sidebar Version --- */
.sidebar-version {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-top: 10px;
    text-align: center;
    letter-spacing: 0.3px;
}

/* --- Settings Card Enhanced --- */
.settings-card {
    background: rgb(255 255 255 / 3%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb), 0.6), transparent);
}

.settings-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
    letter-spacing: 0.2px;
}

.settings-card h3 svg {
    width: 18px;
    height: 18px;
    fill: var(--accent);
    flex-shrink: 0;
}

/* --- Input with Icon --- */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg:first-child {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    flex-shrink: 0;
    pointer-events: none;
    z-index: 1;
    transition: fill 0.2s;
}

.input-with-icon input {
    width: 100%;
    background: rgb(255 255 255 / 4%);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 14px 12px 42px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.input-with-icon input:not(:disabled):focus {
    border-color: rgb(var(--accent-rgb), 0.6);
    background: rgb(255 255 255 / 6%);
    box-shadow: 0 0 0 3px rgb(var(--accent-rgb), 0.12);
}

.input-with-icon:focus-within svg:first-child {
    fill: var(--accent);
}

.input-with-icon--disabled input {
    opacity: 0.45;
    cursor: not-allowed;
}

.input-lock-icon {
    position: absolute;
    right: 12px;
    opacity: 0.35;
}

.input-lock-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
}

/* --- Setting Row Label --- */
.setting-row label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- Dashboard Buttons --- */
.btn-dash-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), var(--btn-grad-2));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
}

.btn-dash-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgb(255 255 255 / 15%), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-dash-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgb(var(--accent-rgb), 0.4);
}

.btn-dash-primary:hover::after {
    opacity: 1;
}

.btn-dash-primary:active {
    transform: translateY(0);
}

.btn-dash-primary svg {
    width: 18px;
    height: 18px;
    fill: currentcolor;
    flex-shrink: 0;
}

.btn-dash-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgb(255 255 255 / 5%);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    text-decoration: none;
    font-family: var(--font-family);
}

.btn-dash-ghost:hover {
    background: rgb(255 255 255 / 10%);
    color: var(--text-main);
    border-color: rgb(255 255 255 / 20%);
    transform: translateY(-1px);
}

.btn-dash-ghost svg {
    width: 16px;
    height: 16px;
    fill: currentcolor;
    flex-shrink: 0;
}

/* --- Tab Header Flex Alignment for Clear Button --- */
.tab-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.tab-header>div:nth-child(2) {
    flex: 1;
}

/* --- Download Item Enhanced --- */
.download-item {
    background: rgb(255 255 255 / 2%);
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.download-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 3px 0 0 3px;
}

.download-item:hover {
    background: rgb(255 255 255 / 5%);
    transform: translateX(4px);
    border-color: rgb(var(--accent-rgb), 0.2);
    box-shadow: 0 4px 20px rgb(0 0 0 / 20%);
}

.download-item:hover::before {
    opacity: 1;
}

/* --- Download Icon --- */
.dl-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dl-icon svg {
    width: 20px;
    height: 20px;
}

.dl-icon--mp3 {
    background: rgb(214 9 142 / 15%);
    border: 1px solid rgb(214 9 142 / 25%);
}

.dl-icon--mp3 svg {
    fill: #d6098e;
}

.dl-icon--wav {
    background: rgb(212 175 55 / 15%);
    border: 1px solid rgb(212 175 55 / 25%);
}

.dl-icon--wav svg {
    fill: var(--gold);
}

.dl-info {
    flex: 1;
    min-width: 0;
}

.dl-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.dl-badge {
    background: rgb(var(--accent-rgb), 0.15);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgb(var(--accent-rgb), 0.2);
}

.dl-check {
    width: 20px;
    height: 20px;
    fill: var(--accent);
    opacity: 0.6;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.download-item:hover .dl-check {
    opacity: 1;
}

/* --- Empty State Enhanced --- */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--text-muted);
    background: rgb(255 255 255 / 1.5%);
    border: 1px dashed rgb(255 255 255 / 10%);
    border-radius: 20px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    fill: var(--text-muted);
    opacity: 0.3;
    display: block;
    margin: 0 auto 16px;
}

.empty-state p {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(255 255 255 / 50%);
    margin-bottom: 8px;
}

.empty-state span {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ---- SUBSCRIPTION CARD ENHANCED ---- */
.subscription-card {
    background: rgb(255 255 255 / 3%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px 30px;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
}

.subscription-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb), 0.6), transparent);
}

.sub-status-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgb(var(--accent-rgb), 0.2), rgb(var(--accent-rgb), 0.05));
    border: 1px solid rgb(var(--accent-rgb), 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sub-status-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--accent);
}

.sub-status {
    flex: 1;
}

.sub-status-eyebrow {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.sub-status h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.sub-status p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Plan Compare Grid --- */
.plan-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 680px;
    margin-top: 4px;
}

.plan-compare-card {
    background: rgb(255 255 255 / 3%);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 24px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.plan-compare-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 15%), transparent);
}

.plan-compare-card.is-current {
    border-color: rgb(var(--accent-rgb), 0.4);
    box-shadow: 0 0 0 1px rgb(var(--accent-rgb), 0.15), 0 8px 30px rgb(var(--accent-rgb), 0.1);
}

.plan-compare-card--pro {
    background: rgb(212 175 55 / 5%);
}

.plan-compare-card--pro::after {
    background: linear-gradient(90deg, transparent, rgb(212 175 55 / 30%), transparent);
}

.plan-compare-card--pro.is-current {
    border-color: rgb(212 175 55 / 50%);
    box-shadow: 0 0 0 1px rgb(212 175 55 / 20%), 0 8px 30px rgb(212 175 55 / 15%);
}

.plan-compare-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.plan-compare-head h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 7px;
}

.plan-compare-head h4 svg {
    width: 16px;
    height: 16px;
    fill: var(--gold);
}

.plan-compare-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.plan-compare-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 16px;
    background: rgb(var(--accent-rgb), 0.15);
    color: var(--accent);
    border: 1px solid rgb(var(--accent-rgb), 0.2);
    opacity: 0;
    pointer-events: none;
}

.plan-compare-card.is-current .plan-compare-badge {
    opacity: 1;
}

/* --- Plan Feature List --- */
.plan-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.plan-feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 6px 0;
    border-bottom: 1px solid rgb(255 255 255 / 4%);
}

.plan-feature-list li:last-child {
    border-bottom: none;
}

.plan-feature-list li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.plan-feature-list .feature-included {
    color: var(--text-main);
}

.plan-feature-list .feature-included svg {
    fill: #4caf50;
}

.plan-feature-list .feature-locked {
    opacity: 0.45;
}

.plan-feature-list .feature-locked svg {
    fill: #555;
}

/* Pro plan features get gold checkmarks when is-current */
.plan-compare-card--pro.is-current .feature-included svg {
    fill: var(--gold);
}

/* ---- HELP & SUPPORT TAB ---- */
.help-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 680px;
    margin-bottom: 32px;
}

.help-card {
    background: rgb(255 255 255 / 3%);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 28px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.help-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 12%), transparent);
}

.help-card:hover {
    border-color: rgb(var(--accent-rgb), 0.3);
    background: rgb(255 255 255 / 5%);
    transform: translateY(-2px);
}

.help-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgb(var(--accent-rgb), 0.2), rgb(var(--accent-rgb), 0.05));
    border: 1px solid rgb(var(--accent-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.help-card:hover .help-card-icon {
    box-shadow: 0 4px 16px rgb(var(--accent-rgb), 0.3);
}

.help-card-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--accent);
}

.help-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.help-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* ---- FAQ SECTION ---- */
.faq-section {
    max-width: 680px;
}

.faq-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
}

.faq-item {
    background: rgb(255 255 255 / 2.5%);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: rgb(var(--accent-rgb), 0.2);
}

.faq-item[open] {
    border-color: rgb(var(--accent-rgb), 0.35);
    background: rgb(var(--accent-rgb), 0.04);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-main);
    gap: 12px;
    transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-chevron {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
    fill: var(--accent);
}

.faq-item p {
    padding: 0 20px 18px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--glass-border);
    margin-top: 0;
    padding-top: 14px;
}

/* ---- STAT BOX HOVER ---- */
.stat-box {
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    cursor: default;
}

.stat-box:hover {
    border-color: rgb(var(--accent-rgb), 0.3);
    background: rgb(var(--accent-rgb), 0.06);
    transform: translateY(-2px);
}

/* ---- DASHBOARD CONTENT SCROLL STYLING ---- */
.dashboard-content::-webkit-scrollbar {
    width: 5px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: rgb(255 255 255 / 10%);
    border-radius: 10px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: rgb(255 255 255 / 20%);
}

/* ---- DASHBOARD INNER GRADIENT BORDER ---- */
.dashboard-inner {
    background: linear-gradient(135deg, rgb(255 255 255 / 4%) 0%, rgb(255 255 255 / 1%) 100%) !important;
    border: 1px solid rgb(255 255 255 / 10%) !important;
}

/* ---- RESPONSIVE DASHBOARD ---- */
@media (max-width: 700px) {
    .dashboard-inner {
        flex-direction: column;
        height: 95vh;
    }

    .dashboard-sidebar {
        width: 100%;
        padding: 16px 0;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        flex-shrink: 0;
    }

    .sidebar-banner {
        display: none;
    }

    .user-profile-brief {
        flex-direction: row;
        padding: 8px 16px 16px;
        gap: 14px;
        align-items: center;
        text-align: left;
    }

    .avatar-wrap {
        margin-bottom: 0;
    }

    .user-avatar {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }

    .avatar-edit-btn {
        width: 52px;
        height: 52px;
    }

    .user-info-brief {
        text-align: left;
        margin-bottom: 0;
    }

    .user-stats {
        display: none;
    }

    .dashboard-nav {
        flex-direction: row;
        padding: 0 12px;
        gap: 4px;
        overflow-x: auto;
        flex: none;
    }

    .nav-item {
        padding: 8px 12px;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .nav-item-label {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .dashboard-content {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
    }

    .plan-compare-grid,
    .help-cards-grid {
        grid-template-columns: 1fr;
    }

    .subscription-card {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
}

/* GOOGLE SIGN-IN BUTTON & DIVIDER */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.auth-divider:not(:empty)::before {
    margin-right: .8em;
}

.auth-divider:not(:empty)::after {
    margin-left: .8em;
}

.btn-google {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background 0.2s, transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 10px;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(1px);
}

.google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Google Button Loading State */
.btn-google.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-google.loading .google-icon {
    display: none;
}

.btn-google.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: google-spin 0.6s linear infinite;
    margin-right: 8px;
}

@keyframes google-spin {
    to {
        transform: rotate(360deg);
    }
}