/* ── Pre-Save Landing Page ──────────────────────────────────────────────
   Premium marketing CSS for public-facing pre-save pages.
   No Radzen components — pure HTML + CSS for maximum visual control.
   ───────────────────────────────────────────────────────────────────── */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Theme Variables ─────────────────────────────────────────────────── */
:root {
    --ps-bg-start: #0a0a1a;
    --ps-bg-end: #1a0a2e;
    --ps-accent: #8b5cf6;
    --ps-accent-hover: #a78bfa;
    --ps-glass-bg: rgba(255, 255, 255, 0.05);
    --ps-glass-border: rgba(255, 255, 255, 0.1);
    --ps-text-primary: #ffffff;
    --ps-text-secondary: rgba(255, 255, 255, 0.7);
    --ps-text-muted: rgba(255, 255, 255, 0.4);
    --ps-success: #10b981;
    --ps-error: #ef4444;
    --ps-glow: rgba(139, 92, 246, 0.3);
    --ps-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Keyframes ───────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--ps-glow), 0 0 40px rgba(139, 92, 246, 0.15);
    }
    50% {
        box-shadow: 0 0 30px var(--ps-glow), 0 0 60px rgba(139, 92, 246, 0.25);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes countdownFlip {
    0% {
        transform: translateY(-4px);
        opacity: 0.6;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Page Shell ──────────────────────────────────────────────────────── */
.presave-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ps-bg-start) 0%, var(--ps-bg-end) 100%);
    font-family: var(--ps-font);
    color: var(--ps-text-primary);
    overflow: hidden;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* Blurred artwork backdrop */
.presave-backdrop {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(60px) saturate(1.4);
    opacity: 0.25;
    transform: scale(1.2);
    z-index: 0;
    pointer-events: none;
}

.presave-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(10, 10, 26, 0.6) 0%,
        rgba(26, 10, 46, 0.8) 100%);
}

/* ── Container ───────────────────────────────────────────────────────── */
.presave-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Glassmorphism Card ──────────────────────────────────────────────── */
.presave-card {
    width: 100%;
    background: var(--ps-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ps-glass-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Artwork ─────────────────────────────────────────────────────────── */
.presave-artwork {
    width: 280px;
    height: 280px;
    margin: 0 auto 1.75rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 60px var(--ps-glow);
    position: relative;
}

.presave-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.presave-artwork:hover img {
    transform: scale(1.05);
}

.presave-artwork-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--ps-accent) 0%, #6d28d9 50%, #4c1d95 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

/* ── Typography ──────────────────────────────────────────────────────── */
.presave-artist {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ps-accent-hover);
    margin-bottom: 0.5rem;
}

.presave-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ps-text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

/* ── Type Badge ──────────────────────────────────────────────────────── */
.presave-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--ps-accent-hover);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.presave-type-badge.out-now {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--ps-success);
}

/* ── Countdown ───────────────────────────────────────────────────────── */
.presave-countdown {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.presave-countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 56px;
    padding: 0.75rem 0.5rem;
    background: var(--ps-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ps-glass-border);
    border-radius: 12px;
}

.presave-countdown-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--ps-text-primary);
    animation: countdownFlip 0.35s ease-out;
}

.presave-countdown-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ps-text-muted);
}

/* ── Subscriber Count ────────────────────────────────────────────────── */
.presave-subscriber-count {
    font-size: 0.8rem;
    color: var(--ps-text-muted);
    margin-bottom: 1.5rem;
}

.presave-subscriber-count strong {
    color: var(--ps-text-secondary);
}

/* ── Form ────────────────────────────────────────────────────────────── */
.presave-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.presave-input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--ps-font);
    font-size: 0.95rem;
    color: var(--ps-text-primary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ps-glass-border);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.presave-input::placeholder {
    color: var(--ps-text-muted);
}

.presave-input:focus {
    border-color: var(--ps-accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.presave-input.error {
    border-color: var(--ps-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ── CTA Button ──────────────────────────────────────────────────────── */
.presave-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-family: var(--ps-font);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--ps-accent) 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pulse 3s ease-in-out infinite;
}

.presave-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--ps-glow), 0 0 50px rgba(139, 92, 246, 0.2);
}

.presave-btn:active {
    transform: translateY(0);
}

.presave-btn.loading {
    opacity: 0.65;
    cursor: wait;
    animation: none;
}

/* ── Success State ───────────────────────────────────────────────────── */
.presave-success {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.presave-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid var(--ps-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--ps-success);
    animation: checkmark 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.presave-success h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.presave-success p {
    color: var(--ps-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.presave-success .email-highlight {
    color: var(--ps-accent-hover);
    font-weight: 600;
}

/* ── Back Link ───────────────────────────────────────────────────────── */
.presave-back-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--ps-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.presave-back-link:hover {
    color: var(--ps-accent-hover);
}

/* ── Streaming Links (Released State) ────────────────────────────────── */
.presave-streaming-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1.5rem;
}

.presave-streaming-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-family: var(--ps-font);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ps-text-primary);
    background: var(--ps-glass-bg);
    border: 1px solid var(--ps-glass-border);
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.presave-streaming-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.presave-streaming-btn .icon {
    font-size: 1.1rem;
}

/* ── Error State ─────────────────────────────────────────────────────── */
.presave-error {
    color: var(--ps-error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    text-align: left;
}

.presave-error-banner {
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--ps-error);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.4s ease both;
}

/* ── Not Found State ─────────────────────────────────────────────────── */
.presave-not-found {
    text-align: center;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.presave-not-found .not-found-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.presave-not-found h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.presave-not-found p {
    color: var(--ps-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.presave-not-found a {
    color: var(--ps-accent-hover);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.presave-not-found a:hover {
    color: var(--ps-accent);
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.presave-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--ps-text-muted);
    z-index: 1;
    pointer-events: none;
}

.presave-footer strong {
    color: var(--ps-text-secondary);
    font-weight: 600;
}

/* ── Loading Spinner ─────────────────────────────────────────────────── */
.presave-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    animation: fadeInUp 0.5s ease both;
}

.presave-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--ps-glass-border);
    border-top-color: var(--ps-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.presave-loading p {
    color: var(--ps-text-muted);
    font-size: 0.9rem;
}

/* ── Confirmed Banner ────────────────────────────────────────────────── */
.presave-confirmed {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.presave-confirmed h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.presave-confirmed p {
    color: var(--ps-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .presave-page {
        padding: 1.25rem 0.75rem;
    }

    .presave-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }

    .presave-artwork {
        width: 220px;
        height: 220px;
        border-radius: 14px;
        margin-bottom: 1.25rem;
    }

    .presave-title {
        font-size: 1.5rem;
    }

    .presave-artist {
        font-size: 0.7rem;
    }

    .presave-countdown {
        gap: 0.5rem;
    }

    .presave-countdown-item {
        min-width: 48px;
        padding: 0.6rem 0.35rem;
    }

    .presave-countdown-value {
        font-size: 1.35rem;
    }

    .presave-streaming-links {
        grid-template-columns: 1fr;
    }

    .presave-btn {
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
    }
}
