/* ══════════════════════════════════════════════
   Sonarium Player — Design System & Styles
   ══════════════════════════════════════════════ */

:root {
    /* ── Backgrounds ── */
    --bg:          #0a0a0f;
    --bg-surface:  #12121a;
    --bg-hover:    #1a1a28;
    --bg-active:   #222236;

    /* ── Borders ── */
    --border:      #2a2a3a;

    /* ── Text ── */
    --text:        #e8e8f0;
    --text-muted:  #6a6a80;

    /* ── Accent ── */
    --accent:       #e8751a;
    --accent-hover: #f59035;

    /* ── Semantic ── */
    --danger:      #ef4444;
    --success:     #22c55e;
    --warning:     #eab308;
    --info:        #3b82f6;

    /* ── Radius ── */
    --radius:      8px;
    --radius-lg:   12px;

    /* ── Gradients ── */
    --gradient-hero: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #1a1a28 100%);
    --gradient-accent: linear-gradient(135deg, #e8751a 0%, #f59035 100%);
    --gradient-card: linear-gradient(180deg, rgba(18,18,26,0.8) 0%, rgba(10,10,15,0.95) 100%);

    /* ── Shadows ── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(232, 117, 26, 0.15);

    /* ── Overlays ── */
    --overlay-light: rgba(10, 10, 15, 0.55);
    --overlay-heavy: rgba(0, 0, 0, 0.92);
}

/* ══════════════════════════════════════════════
   Reset
   ══════════════════════════════════════════════ */

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Keep text editable/selectable inside form fields */
input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

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

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* ══════════════════════════════════════════════
   Scrollbar
   ══════════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════
   Typography
   ══════════════════════════════════════════════ */

h1 { font-size: 48px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 28px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.4; }

/* ══════════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════════ */

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    text-align: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-primary.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Download buttons: neutral by default, accent on hover */
.btn-download {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.btn-download:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════════
   Cards
   ══════════════════════════════════════════════ */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.15s;
}

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

/* ══════════════════════════════════════════════
   Badges
   ══════════════════════════════════════════════ */

.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(232, 117, 26, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════
   Inputs
   ══════════════════════════════════════════════ */

.input {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    font-size: 14px;
    width: 100%;
    transition: border-color 0.15s;
    font-family: inherit;
}

.input:focus {
    border-color: var(--accent);
    outline: none;
}

.input::placeholder {
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   Navbar
   ══════════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--overlay-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.navbar-brand:hover {
    color: var(--text);
}

.navbar-logo {
    width: 28px;
    height: 28px;
}

.navbar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar-links a {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s;
}

.navbar-links a:hover {
    color: var(--text);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-user-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

/* ── Hamburger button ── */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease;
}

.navbar-hamburger:hover {
    border-color: var(--accent);
}

.hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-hamburger--open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-hamburger--open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.navbar-hamburger--open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile dropdown menu ── */
.navbar-mobile {
    display: none;
    flex-direction: column;
    padding: 8px 20px 16px;
    background: var(--overlay-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    /* collapsed state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}

.navbar-mobile--open {
    max-height: 420px;
    opacity: 1;
}

.navbar-mobile a {
    display: block;
    padding: 14px 4px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(42, 42, 58, 0.5);
    transition: color 0.15s;
}

.navbar-mobile a:hover {
    color: var(--text);
}

.navbar-mobile-login,
.navbar-mobile-logout {
    margin-top: 14px;
    text-align: center;
    border-bottom: none !important;
    width: 100%;
}

/* ══════════════════════════════════════════════
   Hero
   ══════════════════════════════════════════════ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-canvas.visible {
    opacity: 1;
}

.hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 30%, var(--bg) 75%);
    pointer-events: none;
    z-index: 1;
}

.hero-inner {
    max-width: 700px;
    position: relative;
    z-index: 2;
    animation: heroFadeIn 1.2s ease-out 0.3s both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
    animation: heroFadeIn 1s ease-out 0.5s both;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 4px;
    animation: heroFadeIn 1s ease-out 0.7s both;
}

.hero-company {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    opacity: 0.7;
    animation: heroFadeIn 1s ease-out 0.8s both;
}

.hero-company a {
    color: inherit;
    text-decoration: none;
}

.hero-subtitle {
    font-size: 22px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 20px;
    animation: heroFadeIn 1s ease-out 0.9s both;
}

.hero-description {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
    animation: heroFadeIn 1s ease-out 1.1s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroFadeIn 1s ease-out 1.3s both;
}

/* ══════════════════════════════════════════════
   Footer
   ══════════════════════════════════════════════ */

.footer {
    border-top: 1px solid var(--border);
    padding: 48px 24px;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-partner {
    color: var(--text-muted);
    font-size: 12px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 12px;
}

.footer-copyright a {
    color: inherit;
    text-decoration: none;
}

/* ══════════════════════════════════════════════
   Page Sections (generic)
   ══════════════════════════════════════════════ */

.page-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

/* ══════════════════════════════════════════════
   Landing Sections
   ══════════════════════════════════════════════ */

.landing-section {
    padding: 100px 24px;
}

.landing-section--alt {
    background: var(--bg-surface);
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-description {
    font-size: 16px;
    color: var(--text-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.section-quote {
    margin-top: 40px;
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
    background: rgba(232, 117, 26, 0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    font-style: italic;
}

.section-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 32px;
}

/* ══════════════════════════════════════════════
   Format Grid (pills)
   ══════════════════════════════════════════════ */

.format-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.format-pill {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(232, 117, 26, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(232, 117, 26, 0.2);
    transition: all 0.15s;
}

.format-pill:hover {
    background: rgba(232, 117, 26, 0.2);
    border-color: var(--accent);
}

/* ══════════════════════════════════════════════
   Formats Table
   ══════════════════════════════════════════════ */

.formats-table {
    max-width: 600px;
    margin: 0 auto 32px;
}

.format-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.format-row:last-child {
    border-bottom: none;
}

.format-name {
    font-weight: 600;
    font-size: 14px;
}

.format-detail {
    color: var(--text-muted);
    font-size: 13px;
}

/* ══════════════════════════════════════════════
   Audio Output Grid
   ══════════════════════════════════════════════ */

.audio-output-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.audio-output-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    transition: all 0.15s;
}

.audio-output-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.audio-output-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.audio-output-card h3 {
    margin-bottom: 8px;
}

.audio-output-card p {
    color: var(--text-muted);
    font-size: 13px;
}

/* ══════════════════════════════════════════════
   Screenshot Slider
   ══════════════════════════════════════════════ */

.screenshot-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.slider-slides {
    position: relative;
    min-height: 400px;
}

.slider-slide {
    display: none;
    padding: 40px;
    gap: 40px;
    align-items: center;
}

.slider-slide--active {
    display: flex;
}

.slider-slide-image {
    flex: 1;
    min-width: 0;
    position: relative;
}

.slider-slide-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.slider-slide-image:hover img {
    transform: scale(1.01);
}

.slider-slide-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.slider-slide-image:hover .slider-slide-zoom {
    opacity: 1;
}

/* ── Lightbox modal ── */
.slider-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
    animation: slider-modal-in 0.2s ease-out;
}

@keyframes slider-modal-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slider-modal-img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    cursor: zoom-out;
    animation: slider-modal-zoom 0.2s ease-out;
}

@keyframes slider-modal-zoom {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.slider-modal-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}

.slider-modal-close:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.slider-modal-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    z-index: 2001;
}

.slider-modal-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.slider-modal-arrow--prev { left: 24px; }
.slider-modal-arrow--next { right: 24px; }

@media (max-width: 600px) {
    .slider-modal-arrow {
        width: 42px;
        height: 42px;
        font-size: 26px;
    }
    .slider-modal-arrow--prev { left: 10px; }
    .slider-modal-arrow--next { right: 10px; }
}

.slider-slide-content {
    flex: 1;
    min-width: 0;
}

.slider-slide-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.slider-slide-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.slider-slide-bullets {
    list-style: none;
    padding: 0;
}

.slider-slide-bullets li {
    font-size: 13px;
    color: var(--text);
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.slider-slide-bullets li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* Slider navigation row (arrows + dots) */
.slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0 20px;
}

/* Slider arrows — absolute on desktop, centered vertically on the image */
.slider-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    z-index: 10;
}

.slider-arrow:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.slider-arrow--prev {
    left: 12px;
}

.slider-arrow--next {
    right: 12px;
}

/* Slider dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.slider-dot--active {
    background: var(--accent);
    border-color: var(--accent);
}

.slider-dot:hover {
    border-color: var(--accent);
}

/* ══════════════════════════════════════════════
   Performance Grid
   ══════════════════════════════════════════════ */

.performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.performance-item {
    text-align: center;
    padding: 24px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.performance-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.performance-label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ══════════════════════════════════════════════
   Philosophy Grid
   ══════════════════════════════════════════════ */

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.philosophy-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.15s;
}

.philosophy-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.philosophy-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 16px;
}

.philosophy-card h3 {
    margin-bottom: 12px;
}

.philosophy-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════
   Compatibility Grid
   ══════════════════════════════════════════════ */

.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.compatibility-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: all 0.15s;
}

.compatibility-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.compatibility-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 16px;
}

.compatibility-card h3 {
    margin-bottom: 8px;
}

.compatibility-mode {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.compatibility-detail {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════
   Pricing Page
   ══════════════════════════════════════════════ */

.pricing-page {
    text-align: center;
}

.pricing-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    width: 340px;
    display: flex;
    flex-direction: column;
    transition: all 0.15s;
}

.pricing-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

.pricing-card--highlighted {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
    position: relative;
}

.pricing-card--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pricing-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.pricing-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0 16px;
}

.pricing-card-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.pricing-card-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.pricing-card-detail {
    font-size: 14px;
    color: var(--text-muted);
}

.pricing-card-benefits {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
    flex: 1;
    text-align: left;
}

.pricing-card-benefit {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pricing-card-check {
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-card-cta {
    width: 100%;
}

.pricing-note {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 24px;
    border-left: 3px solid var(--accent);
    background: rgba(232, 117, 26, 0.05);
    border-radius: 0 var(--radius) var(--radius) 0;
    text-align: left;
}

.pricing-note p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.pricing-note p + p {
    margin-top: 10px;
}

/* Disclaimer note inside a pricing card (e.g. alpha "may contain bugs") */
.pricing-card-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: var(--radius);
    text-align: left;
}

.pricing-card-note-icon {
    flex-shrink: 0;
    color: var(--warning);
    font-size: 13px;
    line-height: 1.4;
}

/* ── Checkout Success ── */
.checkout-success-page {
    text-align: center;
}

.checkout-success-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-accent);
}

.checkout-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    background: var(--gradient-accent);
    border-radius: 50%;
}

.checkout-success-icon--pending {
    background: var(--bg-hover);
}

.checkout-success-message {
    font-size: 17px;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.6;
}

.checkout-success-detail {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.checkout-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.checkout-success-note {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto;
}

/* ── Account / Profile ── */
.account-page {
    max-width: 1100px;
    margin: 0 auto;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 24px;
}

.account-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.account-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 28px;
    text-align: left;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.account-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
}

.account-card--empty {
    text-align: center;
}

/* License card with animated diamond (WebGL) background */
.account-card--license {
    position: relative;
    overflow: hidden;
}

/* The canvas fills the card; everything else sits above it */
.account-card--license > .hero-canvas {
    z-index: 0;
}

.account-card--license > *:not(.hero-canvas) {
    position: relative;
    z-index: 1;
}

.account-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.account-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(42, 42, 58, 0.5);
}

.account-field:last-child {
    border-bottom: none;
}

.account-field-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.account-field-value {
    font-size: 14px;
    color: var(--text);
    text-align: right;
    word-break: break-word;
}

.license-key {
    font-family: monospace;
    letter-spacing: 1px;
    color: var(--accent);
}

/* ── Email verification banner ── */
.verify-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 760px;
    margin: 0 auto 24px;
    padding: 16px 20px;
    background: rgba(232, 117, 26, 0.08);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    text-align: left;
}

.verify-banner-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
}

.verify-banner-text {
    flex: 1;
}

.verify-banner-text strong {
    color: var(--text);
    font-size: 15px;
}

.verify-banner-text p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 4px 0 0;
    line-height: 1.5;
}

.verify-banner-email {
    color: var(--accent);
    font-weight: 600;
}

.verify-banner-error {
    color: var(--danger, #ef4444) !important;
}

.verify-banner-sent {
    flex-shrink: 0;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.resend-session-email {
    margin: 16px 0 24px;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: 15px;
}

@media (max-width: 600px) {
    .verify-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

.account-field--qr {
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.license-qr-container {
    display: flex;
    justify-content: center;
}

.license-qr {
    width: 140px;
    height: 140px;
}

.license-qr-svg {
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    padding: 8px;
}

.account-name-display,
.account-name-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.account-empty-text {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.license-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.license-status--active {
    color: var(--success);
    background: rgba(34, 197, 94, 0.12);
}

.license-status--inactive {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
}

.device-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-name {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.device-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.device-last-seen {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.device-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.device-remove {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
}

.device-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.account-billing {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.account-license-revoked {
    margin-top: 16px;
    padding: 14px 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius);
}

.account-license-revoked p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.account-pw-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.account-pw-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-pw-form label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.account-pw-form .btn-primary {
    align-self: flex-start;
}

/* ── Pricing: already owned ── */
.pricing-loading {
    text-align: center;
    padding: 60px 20px;
}

/* Transparency banner shown above the (disabled) cards when owned */
.pricing-owned-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 720px;
    margin: 0 auto 28px;
    padding: 14px 20px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    text-align: left;
}

.pricing-owned-banner-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: white;
    background: var(--success);
    border-radius: 50%;
}

.pricing-owned-banner-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.pricing-owned-banner-text strong {
    color: var(--text);
}

.pricing-owned-banner-plan {
    color: var(--accent);
    font-weight: 600;
}

.pricing-owned {
    max-width: 520px;
    margin: 0 auto 32px;
    padding: 40px 32px;
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-accent);
}

.pricing-owned-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    background: var(--gradient-accent);
    border-radius: 50%;
}

.pricing-owned h2 {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 12px;
}

.pricing-owned p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.pricing-owned-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   Download Page
   ══════════════════════════════════════════════ */

.download-page {
    text-align: center;
}

.download-version-badge {
    display: inline-block;
    margin: -16px auto 32px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
    letter-spacing: 1px;
    color: var(--accent);
    background: rgba(232, 117, 26, 0.1);
    border: 1px solid rgba(232, 117, 26, 0.25);
    border-radius: 999px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.download-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Accent bar on top — revealed on hover, fixed on the recommended card */
.download-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.download-card:hover::before,
.download-card--recommended::before {
    opacity: 1;
}

.download-card-action {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-card-action > a,
.download-card-action > button {
    min-width: 180px;
}

.download-card-hint {
    display: inline-block;
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 999px;
}

/* Recommended (auto-detected OS) card */
.download-card--recommended {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 8px 40px rgba(232, 117, 26, 0.12);
}

.download-card-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
}

.download-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
    transform: translateY(-4px);
}

.download-card h3 {
    margin-bottom: 6px;
    font-size: 18px;
}

.download-card-req {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 22px;
}

.download-linux-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 220px;
}

.download-linux-options a {
    width: 100%;
}

.download-auth-notice {
    padding: 20px 24px;
    background: rgba(232, 117, 26, 0.05);
    border: 1px solid rgba(232, 117, 26, 0.2);
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.download-auth-notice p {
    color: var(--text-muted);
    font-size: 14px;
}

.download-requirements {
    text-align: left;
    max-width: 680px;
    margin: 0 auto;
}

.download-requirements h2 {
    margin-bottom: 16px;
    font-size: 22px;
    text-align: center;
}

.requirements-table {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.requirement-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.requirement-row:hover {
    background: var(--bg-hover);
}

.requirement-row:last-child {
    border-bottom: none;
}

.requirement-detail {
    color: var(--text-muted);
    font-size: 14px;
}

.requirement-platform {
    font-weight: 600;
    font-size: 14px;
}

.requirement-detail {
    color: var(--text-muted);
    font-size: 13px;
}

/* ══════════════════════════════════════════════
   Auth Pages (Login / Register)
   ══════════════════════════════════════════════ */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px);
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-form-container h1 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--danger);
    font-size: 13px;
}

.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--success);
    font-size: 13px;
}

.auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    text-align: center;
}

.auth-links a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.15s;
}

.auth-links a:hover {
    color: var(--accent);
}

/* Password validation */
.password-requirements {
    margin-top: 4px;
}

.password-errors {
    list-style: none;
    padding: 0;
}

.password-errors li {
    font-size: 12px;
    color: var(--danger);
    padding: 2px 0;
}

.password-errors li::before {
    content: "✗ ";
}

.password-valid {
    font-size: 12px;
    color: var(--success);
}

/* ══════════════════════════════════════════════
   Legal Pages (Terms / Privacy)
   ══════════════════════════════════════════════ */

.legal-page {
    padding-top: 100px;
}

.legal-content {
    max-width: 720px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 22px;
    margin-top: 40px;
    margin-bottom: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.legal-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.legal-content h3 {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 8px;
    color: var(--accent);
}

.legal-content p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-content li {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
    padding: 2px 0;
}

/* ══════════════════════════════════════════════
   Error Message
   ══════════════════════════════════════════════ */

.error-message {
    color: var(--danger);
    font-size: 14px;
    text-align: center;
    min-height: 0;
}

/* ══════════════════════════════════════════════
   Auth Guard Loading
   ══════════════════════════════════════════════ */

.auth-guard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
    .account-grid {
        grid-template-columns: 1fr;
    }
    .pricing-owned-banner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 12px;
    }
    .pricing-owned-banner .btn-secondary {
        width: 100%;
        text-align: center;
    }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 17px; }
    .hero-description { font-size: 14px; }
    .hero-logo { width: 90px; height: 90px; }
    .hero { padding: 100px 20px 60px; min-height: auto; }
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    .section-title { font-size: 24px; }
    .section-description { font-size: 14px; margin-bottom: 32px; }

    /* Navbar: hide desktop links, show hamburger */
    .navbar-inner { padding: 0 16px; }
    .navbar-links { display: none; }
    .navbar-title { font-size: 14px; }
    .navbar-logo { width: 26px; height: 26px; }
    .navbar-hamburger { display: flex; }
    .navbar-mobile { display: flex; }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .audio-output-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 12px;
    }

    .audio-output-card { padding: 16px; }

    /* Slider: stack vertically, keep arrows on image sides */
    .slider-slide {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .slider-slide-image { order: -1; position: relative; }

    .slider-slide-title { font-size: 18px; }
    .slider-slide-description { font-size: 13px; }

    .screenshot-slider {
        position: relative;
    }

    .slider-slides {
        min-height: auto;
    }

    .slider-arrow {
        position: static;
        transform: none;
        width: 36px;
        height: 36px;
        font-size: 20px;
        z-index: 10;
        flex-shrink: 0;
    }

    .slider-arrow--prev { left: auto; }
    .slider-arrow--next { right: auto; }

    .slider-nav {
        padding: 8px 0 16px;
    }

    .performance-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .performance-item { padding: 16px 12px; }
    .performance-value { font-size: 17px; }
    .performance-label { font-size: 12px; }

    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .philosophy-card { padding: 24px 20px; }

    .compatibility-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .compatibility-card { padding: 24px 20px; }

    .pricing-cards {
        flex-direction: column;
        align-items: center;
    }

    .pricing-card {
        width: 100%;
        max-width: 400px;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .landing-section {
        padding: 48px 16px;
    }

    .page-section {
        padding: 80px 16px 48px;
    }

    .format-grid { gap: 6px; }
    .format-pill { font-size: 11px; padding: 4px 12px; }

    .formats-table { margin-bottom: 20px; }
    .format-row { padding: 10px 12px; }
    .format-name { font-size: 13px; }
    .format-detail { font-size: 12px; }

    .footer { padding: 32px 16px; }
    .footer-links { gap: 16px; }

    .legal-content h1 { font-size: 28px; }
    .legal-page { padding-top: 80px; }

    .auth-form-container { padding: 0 16px; }
    .auth-form-container h1 { font-size: 24px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 26px; }
    .hero-logo { width: 70px; height: 70px; }
    .hero { padding: 80px 16px 48px; }

    .navbar-inner { padding: 0 12px; height: 52px; }
    .navbar-title { font-size: 13px; }

    .section-title { font-size: 20px; }

    .performance-grid { grid-template-columns: 1fr; }

    .format-row {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }

    .requirement-row {
        flex-direction: column;
        gap: 2px;
    }

    .slider-slide { padding: 16px; gap: 16px; }
    .slider-slide-title { font-size: 16px; }
    .slider-slide-bullets li { font-size: 12px; }
}

/* ══════════════════════════════════════════════
   Auth confirmation views + animations
   ══════════════════════════════════════════════ */

.auth-confirm {
    text-align: center;
    padding: 16px 0;
    animation: auth-confirm-in 0.4s ease-out both;
}

@keyframes auth-confirm-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-confirm h1 {
    margin-bottom: 12px;
}

.auth-confirm-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto 28px;
}

.auth-confirm-email {
    color: var(--accent);
    font-weight: 600;
}

.auth-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Animated "email sent" (envelope + sonar rings) ── */
.email-sent-anim {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 8px auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-sent-svg {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    overflow: visible;
    animation: env-float 3s ease-in-out infinite;
}

.email-sent-svg .env-body {
    fill: var(--bg-surface);
    stroke: var(--accent);
    stroke-width: 2.5;
}

.email-sent-svg .env-flap {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* draw-in the flap once */
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: env-flap-draw 0.7s ease-out 0.2s forwards;
}

@keyframes env-flap-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes env-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* Sonar rings pulsing outward — on-brand for Sonarium */
.sonar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    animation: sonar-pulse 2.8s ease-out infinite;
}

.sonar-ring:nth-child(2) { animation-delay: 0.9s; }
.sonar-ring:nth-child(3) { animation-delay: 1.8s; }

@keyframes sonar-pulse {
    0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.9); opacity: 0; }
}

/* ── Animated success check (reset password) ── */
.auth-confirm-check {
    width: 96px;
    height: 96px;
    margin: 8px auto 24px;
}

.auth-check-svg {
    width: 100%;
    height: 100%;
}

.auth-check-circle {
    stroke: var(--success);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: check-circle-draw 0.6s ease-out forwards;
}

.auth-check-mark {
    stroke: var(--success);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: check-mark-draw 0.4s ease-out 0.5s forwards;
}

@keyframes check-circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes check-mark-draw {
    to { stroke-dashoffset: 0; }
}

/* ── Verify: spinner + animated error ── */
.verify-spinner {
    width: 64px;
    height: 64px;
    margin: 8px auto 24px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: verify-spin 0.9s linear infinite;
}

@keyframes verify-spin {
    to { transform: rotate(360deg); }
}

.auth-confirm-error-icon {
    width: 96px;
    height: 96px;
    margin: 8px auto 24px;
}

.auth-error-circle {
    stroke: var(--danger);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: check-circle-draw 0.6s ease-out forwards;
}

.auth-error-cross {
    stroke: var(--danger);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 46;
    stroke-dashoffset: 46;
    animation: check-mark-draw 0.4s ease-out 0.5s forwards;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .email-sent-svg,
    .sonar-ring,
    .env-flap,
    .auth-check-circle,
    .auth-check-mark,
    .auth-error-circle,
    .auth-error-cross,
    .verify-spinner,
    .auth-confirm {
        animation: none;
    }
    .env-flap,
    .auth-check-circle,
    .auth-check-mark,
    .auth-error-circle,
    .auth-error-cross {
        stroke-dashoffset: 0;
    }
    .verify-spinner {
        border-top-color: var(--accent);
    }
}

/* ══════════════════════════════════════════════
   2FA / TOTP
   ══════════════════════════════════════════════ */

.totp-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.totp-status--on {
    color: var(--text);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.totp-status-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.totp-instructions {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.totp-qr {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.totp-qr img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    background: white;
    padding: 10px;
}

.totp-qr .license-qr {
    width: 200px;
    height: 200px;
}

.totp-qr .license-qr-svg {
    width: 100%;
    height: 100%;
    padding: 8px;
}

.totp-secret {
    display: block;
    text-align: center;
    font-family: monospace;
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--accent);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 18px;
    word-break: break-all;
}

/* ── Billing history ── */
.pay-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pay-date {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted);
}

.pay-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pay-refund-note {
    font-size: 11px;
    color: var(--info);
}

.pay-amount {
    font-size: 13px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.pay-receipt {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

.pay-receipt:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.pay-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    color: var(--text-muted);
    background: var(--bg-hover);
}

.pay-badge--ok {
    color: var(--success);
    background: rgba(34, 197, 94, 0.12);
}

.pay-badge--refund {
    color: var(--info);
    background: rgba(59, 130, 246, 0.12);
}

.pay-badge--warn {
    color: var(--warning);
    background: rgba(234, 179, 8, 0.12);
}

/* ══════════════════════════════════════════════
   Language Selector
   ══════════════════════════════════════════════ */

.language-selector {
    position: relative;
    display: inline-flex;
}

.language-selector-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.language-selector-btn:hover {
    color: var(--text);
    border-color: var(--accent);
}

.language-selector-current {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-selector-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.language-selector-dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-selector-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.language-selector-option:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.language-selector-option--active {
    color: var(--accent);
    font-weight: 600;
}

/* RTL support */
[dir="rtl"] .language-selector-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .language-selector-option {
    text-align: right;
}

/* Mobile adjustments */
.navbar-mobile .language-selector {
    padding: 8px 0;
}

.navbar-mobile .language-selector-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    max-height: none;
}

.navbar-mobile .language-selector-dropdown:not(.language-selector-dropdown--open) {
    display: none;
}

/* Honeypot field — hidden from real users; bots that fill it are rejected.
   Kept in CSS (not an inline style) so the CSP can drop 'unsafe-inline'. */
.honeypot-field {
    display: none !important;
}
