/* ============================================================
   BASE THEME VARIABLES
   ============================================================ */
:root {
    --bg: #050608;
    --bg-alt: #101018;
    --text: #e0f7ff;
    --accent: #00ffc8;
    --accent-soft: rgba(0, 255, 200, 0.15);
    --border: #00ffc8;
    --shadow: 0 0 18px rgba(0, 255, 200, 0.4);
    --header-gradient: linear-gradient(135deg, #020b0b, #041f1f);
    --ascii-color: #00ffc8;
    --font-main: Consolas, "Courier New", monospace;
}

/* MATRIX */
body.theme-matrix {
    --bg: #020403;
    --bg-alt: #020806;
    --text: #a8ffb0;
    --accent: #00ff41;
    --accent-soft: rgba(0, 255, 65, 0.15);
    --border: #00ff41;
    --shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    --header-gradient: radial-gradient(circle at top, #003311, #000000);
    --ascii-color: #00ff41;
}

/* STEAMPUNK */
body.theme-steampunk {
    --bg: #1b130f;
    --bg-alt: #261911;
    --text: #f3e0c7;
    --accent: #d29b4b;
    --accent-soft: rgba(210, 155, 75, 0.18);
    --border: #d29b4b;
    --shadow: 0 0 18px rgba(210, 155, 75, 0.5);
    --header-gradient: linear-gradient(135deg, #3b2414, #120a06);
    --ascii-color: #f3e0c7;
}

/* CYBERPUNK */
body.theme-cyberpunk {
    --bg: #050014;
    --bg-alt: #0b0024;
    --text: #f5e9ff;
    --accent: #ff00ff;
    --accent-soft: rgba(255, 0, 255, 0.18);
    --border: #00e5ff;
    --shadow: 0 0 22px rgba(255, 0, 255, 0.7);
    --header-gradient: linear-gradient(135deg, #ff00ff, #00e5ff);
    --ascii-color: #00e5ff;
}

/* FALLOUT */
body.theme-fallout {
    --bg: #020605;
    --bg-alt: #07110d;
    --text: #d7f7c0;
    --accent: #6bff6b;
    --accent-soft: rgba(107, 255, 107, 0.18);
    --border: #6bff6b;
    --shadow: 0 0 18px rgba(107, 255, 107, 0.5);
    --header-gradient: linear-gradient(135deg, #0b2b1a, #020605);
    --ascii-color: #6bff6b;
}

/* IRON MAN */
body.theme-ironman {
    --bg: #120000;
    --bg-alt: #260000;
    --text: #ffe8d2;
    --accent: #ffcc00;
    --accent-soft: rgba(255, 204, 0, 0.18);
    --border: #ff3300;
    --shadow: 0 0 20px rgba(255, 51, 0, 0.7);
    --header-gradient: linear-gradient(135deg, #660000, #ff3300);
    --ascii-color: #ffcc00;
}

/* HULK */
body.theme-hulk {
    --bg: #020803;
    --bg-alt: #041208;
    --text: #d8ffd8;
    --accent: #4cff4c;
    --accent-soft: rgba(76, 255, 76, 0.18);
    --border: #4cff4c;
    --shadow: 0 0 20px rgba(76, 255, 76, 0.7);
    --header-gradient: linear-gradient(135deg, #0b3b0b, #020803);
    --ascii-color: #4cff4c;
}

/* THOR */
body.theme-thor {
    --bg: #020414;
    --bg-alt: #05082a;
    --text: #e6f0ff;
    --accent: #ffd700;
    --accent-soft: rgba(255, 215, 0, 0.18);
    --border: #87cefa;
    --shadow: 0 0 20px rgba(135, 206, 250, 0.7);
    --header-gradient: linear-gradient(135deg, #001f3f, #4b0082);
    --ascii-color: #87cefa;
}

body.theme-kpop {
    --bg: #ffe6f7; /* soft pastel base */
    --bg-alt: #fff0fb; /* slightly lighter for panels */
    --text: #4a004e; /* deep plum text */
    --accent: #ff3bd4; /* hot pink */
    --accent-soft: rgba(255, 59, 212, 0.18);
    --border: #ff8bf0; /* pastel pink border */
    --shadow: 0 0 20px rgba(255, 59, 212, 0.35);
    --header-gradient: linear-gradient(135deg, #ff9de6, #ffc8ff, #d7b0ff);
    --ascii-color: #ff3bd4;
}

/* ============================================================
   BASE LAYOUT
   ============================================================ */
* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Consolas, "Courier New", monospace !important;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================================
   BOOT SCREEN
   ============================================================ */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #000;
    color: #00ff66;
    font-family: Consolas, "Courier New", monospace; /* ADD THIS */
    padding: 20px;
    font-size: 0.95rem;
    z-index: 9999;
}
#boot-log { white-space: pre-wrap; }

/* ============================================================
   HEADER + ASCII
   ============================================================ */
header {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    background: var(--header-gradient);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

#header-flex {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ASCII wrapper: horizontal scroll on small screens */
#ascii-wrapper {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
}

/* Core ASCII block */
#ascii-logo {
    display: inline-block;
    color: var(--ascii-color);
    text-shadow: 0 0 8px var(--ascii-color);
    font-size: 0.7rem;
    line-height: 1.05;
}

/* Frame container */
.ascii-frame {
    display: inline-block;
    padding: 4px 2px;
    position: relative;
}

/* ============================================================
   THEME FRAMES + ANIMATIONS
   ============================================================ */

/* MATRIX: digital rain burst */
@keyframes matrix-burst {
    0% { box-shadow: 0 0 0 rgba(0,255,65,0); }
    30% { box-shadow: 0 0 25px rgba(0,255,65,0.9); }
    60% { box-shadow: 0 0 10px rgba(0,255,65,0.5); }
    100% { box-shadow: 0 0 18px rgba(0,255,65,0.6); }
}
body.theme-matrix #ascii-logo {
    border: 1px solid #00ff41;
    box-shadow: 0 0 18px rgba(0,255,65,0.6);
    background-image: linear-gradient(to bottom, rgba(0,255,65,0.15), transparent);
    animation: matrix-burst 0.6s ease-out;
}

/* STEAMPUNK: brass gear shimmer */
@keyframes steampunk-gear {
    0% { box-shadow: 0 0 0 rgba(210,155,75,0); transform: translateY(-1px); }
    30% { box-shadow: 0 0 24px rgba(210,155,75,0.9); transform: translateY(1px); }
    60% { box-shadow: 0 0 12px rgba(210,155,75,0.6); transform: translateY(0); }
    100% { box-shadow: 0 0 18px rgba(210,155,75,0.5); }
}
body.theme-steampunk #ascii-logo {
    border: 2px solid #d29b4b;
    box-shadow: 0 0 18px rgba(210,155,75,0.5);
    background-image: radial-gradient(circle at top left, rgba(210,155,75,0.18), transparent 60%);
    animation: steampunk-gear 0.7s ease-out;
}

/* CYBERPUNK: neon glitch */
@keyframes cyber-glitch {
    0% { text-shadow: 2px 0 #ff00ff, -2px 0 #00e5ff; }
    20% { text-shadow: -2px 0 #ff00ff, 2px 0 #00e5ff; }
    40% { text-shadow: 3px 0 #ff00ff, -3px 0 #00e5ff; }
    60% { text-shadow: -1px 0 #ff00ff, 1px 0 #00e5ff; }
    100% { text-shadow: 0 0 8px #00e5ff; }
}
body.theme-cyberpunk #ascii-logo {
    border: 1px solid #00e5ff;
    box-shadow: 0 0 22px rgba(255,0,255,0.7);
    background-image: linear-gradient(135deg, rgba(255,0,255,0.15), rgba(0,229,255,0.15));
    animation: cyber-glitch 0.5s ease-out;
}

/* FALLOUT: CRT phosphor bloom */
@keyframes crt-bloom {
    0% { filter: brightness(0.6); }
    30% { filter: brightness(1.6); }
    60% { filter: brightness(1.1); }
    100% { filter: brightness(1); }
}
body.theme-fallout #ascii-logo {
    border: 1px solid #6bff6b;
    box-shadow: 0 0 18px rgba(107,255,107,0.5);
    background-image: repeating-linear-gradient(
        0deg,
        rgba(107,255,107,0.12),
        rgba(107,255,107,0.12) 1px,
        transparent 1px,
        transparent 3px
    );
    animation: crt-bloom 0.6s ease-out;
}

/* IRON MAN: arc-reactor HUD flare */
@keyframes hud-flare {
    0% { box-shadow: 0 0 0 rgba(255,204,0,0); transform: scale(0.98); }
    30% { box-shadow: 0 0 30px rgba(255,204,0,1); transform: scale(1.02); }
    60% { box-shadow: 0 0 18px rgba(255,51,0,0.8); transform: scale(1); }
    100% { box-shadow: 0 0 20px rgba(255,51,0,0.7); }
}
body.theme-ironman #ascii-logo {
    border: 2px solid #ff3300;
    box-shadow: 0 0 20px rgba(255,51,0,0.7);
    background-image: radial-gradient(circle at center, rgba(255,204,0,0.2), transparent 60%);
    animation: hud-flare 0.7s ease-out;
}

/* HULK: smash quake */
@keyframes hulk-smash {
    0% { transform: translate(0,0); }
    15% { transform: translate(-2px, 1px); }
    30% { transform: translate(3px, -2px); }
    45% { transform: translate(-3px, 2px); }
    60% { transform: translate(2px, -1px); }
    100% { transform: translate(0,0); }
}
body.theme-hulk #ascii-logo {
    border: 2px solid #4cff4c;
    box-shadow: 0 0 20px rgba(76,255,76,0.7);
    background-image: radial-gradient(circle at bottom, rgba(76,255,76,0.18), transparent 60%);
    animation: hulk-smash 0.45s ease-out;
}

/* THOR: lightning strike */
@keyframes thor-strike {
    0% { box-shadow: 0 0 0 rgba(135,206,250,0); filter: brightness(1); }
    20% { box-shadow: 0 0 35px rgba(135,206,250,1); filter: brightness(2); }
    50% { box-shadow: 0 0 18px rgba(135,206,250,0.7); filter: brightness(1.3); }
    100% { box-shadow: 0 0 20px rgba(135,206,250,0.7); filter: brightness(1); }
}
body.theme-thor #ascii-logo {
    border: 2px solid #87cefa;
    box-shadow: 0 0 20px rgba(135,206,250,0.7);
    background-image: linear-gradient(135deg, rgba(135,206,250,0.2), transparent 60%);
    animation: thor-strike 0.6s ease-out;
}

/* K‑POP: sparkle pulse */
@keyframes kpop-sparkle {
    0%   { box-shadow: 0 0 0 rgba(255, 59, 212, 0); filter: brightness(1); }
    25%  { box-shadow: 0 0 28px rgba(255, 59, 212, 0.9); filter: brightness(1.4); }
    50%  { box-shadow: 0 0 14px rgba(255, 59, 212, 0.5); filter: brightness(1.2); }
    100% { box-shadow: 0 0 20px rgba(255, 59, 212, 0.35); filter: brightness(1); }
}

body.theme-kpop #ascii-logo {
    border: 2px solid var(--border);
    box-shadow: 0 0 20px rgba(255, 59, 212, 0.35);
    background-image: linear-gradient(135deg, rgba(255, 59, 212, 0.2), transparent 60%);
    animation: kpop-sparkle 0.6s ease-out;
}

/* Title block */
#title-block h1 {
    margin: 0 0 5px 0;
    font-size: 2.2rem;
}
#title-block p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Theme selector */
#theme-selector {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.theme-btn {
    border: 1px solid var(--border);
    background: var(--accent-soft);
    color: var(--text);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}
.theme-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.theme-btn.active {
    background: var(--accent);
    color: #000;
}

/* ============================================================
   NAVIGATION PANEL
   ============================================================ */
#nav-panel {
    margin-top: 25px;
    padding: 15px;
    background: var(--bg-alt);
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* Nav loading / error message */
#nav-loading {
    display: block;
    padding: 6px 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--accent);
    line-height: 1.3;
    white-space: normal;
}

#nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#nav-header h2 {
    margin: 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

#nav-toggle {
    font-size: 0.9rem;
    opacity: 0.8;
}

#nav-content {
    margin-top: 10px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}
#nav-content.collapsed {
    max-height: 0;
}

.category {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}
.category:first-child {
    border-top: none;
    padding-top: 0;
}
.category-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: 6px;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-list li {
    margin: 4px 0;
}
.nav-list a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    padding-left: 14px;
}
.nav-list a::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--text);
    opacity: 0.7;
}
.nav-list a:hover {
    color: #fff;
    text-shadow: var(--shadow);
}

/* Info panel */
#info-panel {
    margin-top: 25px;
    padding: 15px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    background: radial-gradient(circle at top left, var(--accent-soft), transparent 60%);
    font-size: 0.9rem;
}
#diagnostics {
    margin: 0;              /* no line above */
    padding: 0;
    font-size: 0.8rem;
    color: #ff5555;
    white-space: pre-wrap;
    line-height: 1.3;       /* readable, not crushed */
}


/* ============================
   SYSTEM MONITOR PANEL
   ============================ */

#system-monitor {
    margin-top: 10px;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    line-height: 1.25;
}

.monitor-title {
    margin: 0;
    margin-bottom: 4px;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

#monitor-output {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}


/* Footer */
footer {
    margin: 30px 0 10px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 700px) {
    #header-flex {
        gap: 12px;
    }
}

/* Retro Terminal Renderer */
.terminal-block {
    background: #000;
    color: #00ff66;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #00ff66;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 12px rgba(0,255,102,0.4);
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    background: #00ff66;
    margin-left: 4px;
    animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* VCF Converter UI Fixes */
.drop-zone {
    border: 2px dashed var(--accent);
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
}

.drop-zone.drag-over {
    background: rgba(255,255,255,0.15);
}

.drop-zone.file-selected {
    border-color: var(--accent);
}

.drop-zone p {
    margin: 0.5rem 0;
}




/* ============================================================
   STATUS MESSAGES
   ============================================================ */
.status {
    margin-top: 10px;
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 4px;
    min-height: 1.2em;
}
.status.info  { color: var(--accent); }
.status.ok    { color: #00ff88; }
.status.error { color: #ff5555; background: rgba(255, 85, 85, 0.1); border: 1px solid rgba(255,85,85,0.3); }

/* ============================================================
   DROP ZONE INTERNALS
   ============================================================ */

/* Hide the raw browser file input — the <label> acts as the button */
#vcfFile {
    display: none;
}

/* Title text inside drop zone */
.drop-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 4px;
    text-shadow: 0 0 8px var(--accent);
}

/* Subtitle text */
.drop-sub {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-bottom: 16px;
}

/* Row containing Browse + Convert buttons */
.file-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}

/* Shared button styles */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn:hover:not(:disabled) {
    background: var(--accent);
    color: #000;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Secondary (Browse) button — slightly softer */
.btn.secondary {
    border-color: var(--border);
    background: transparent;
    opacity: 0.85;
}

.btn.secondary:hover {
    background: var(--accent-soft);
    color: var(--text);
    box-shadow: none;
    transform: none;
    opacity: 1;
}

/* File name + size display */
.file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    font-size: 0.85rem;
    margin-top: 8px;
    color: var(--text);
}

.file-meta span {
    white-space: nowrap;
}

.side-card-title {
    font-weight: bold;
    font-size: 1rem;
    margin-top: 16px;
    margin-bottom: 6px;
    color: var(--accent);
}


/* ============================================================
   FALLOUT S.P.E.C.I.A.L. PAGE  (fallout-special.html)
   ============================================================
   All styles are scoped under .fallout-page to avoid
   conflicts with the global site styles.

   Conflict resolutions vs original fallout-stats.html:
     - :root vars       → renamed with --fallout- prefix, scoped
                          to .fallout-page so they don't override
                          the site's global theme variables
     - .btn             → renamed .fallout-btn throughout
     - header {}        → removed; site template header takes over
     - body { font/bg } → scoped to .fallout-page
     - body::before/after (scanlines + grid)
                        → moved to .fallout-page::before/after
                          so they only cover the content section,
                          not the site header/nav/footer
   ============================================================ */


/* ── Scoped CSS custom properties ─────────────────────────────
   Named with --fallout- prefix to avoid colliding with the
   site-wide vars (--bg, --text, etc.) defined in :root above.  */
.fallout-page {
    --fallout-gold:     #5eff6a;                  /* primary green accent      */
    --fallout-gold-dim: rgba(94, 255, 106, 0.12); /* tinted surface wash       */
    --fallout-bg:       #060d06;                  /* deep dark background      */
    --fallout-bg2:      #0a130a;                  /* card / panel background   */
    --fallout-text:     #c8f5c0;                  /* body text colour          */
    --fallout-muted:    #4a7a4a;                  /* de-emphasised text        */
    --fallout-amber:    #ffb000;                  /* secondary amber accent    */
    --fallout-card-w:   340px;                    /* result card width         */
}


/* ── Scanlines overlay ─────────────────────────────────────────
   Originally body::after — scoped here so it only covers the
   content section, not the full-page template chrome.           */
.fallout-page::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.18) 2px,
        rgba(0, 0, 0, 0.18) 4px
    );
    pointer-events: none;
    z-index: 9;    /* sits above content but below interactive elements */
}


/* ── Background grid ───────────────────────────────────────────
   Originally body::before — same scoping rationale as above.    */
.fallout-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(94, 255, 106, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 255, 106, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}


/* ── Wrapper layout ────────────────────────────────────────────
   position:relative is required so ::before/::after are
   contained within this element rather than the viewport.       */
.fallout-page {
    position: relative;
    overflow: hidden;           /* clip scanlines/grid to this box */
    font-family: 'Share Tech Mono', 'DM Sans', monospace;
    background: var(--fallout-bg);
    color: var(--fallout-text);
    padding: 32px 0 64px;
}


/* ── Inner content sits above the pseudo-element layers ───────  */
.fallout-page > * {
    position: relative;
    z-index: 10;
}


/* ── Fallout page header / title block ────────────────────────
   Note: this is the in-content heading (h1 inside .fallout-page),
   NOT the site template <header> which is handled by styles.css.  */
.fallout-page .fallout-header {
    text-align: center;
    padding: 24px 24px 32px;
}

.fallout-page .fallout-header h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(52px, 8vw, 88px);
    letter-spacing: 6px;
    color: var(--fallout-gold);
    line-height: 1;
    text-shadow: 0 0 30px rgba(94, 255, 106, 0.6), 0 0 80px rgba(94, 255, 106, 0.2);
    margin: 0;
}

.fallout-page .fallout-header .sub-edition {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--fallout-amber);
    text-transform: uppercase;
    margin-top: 6px;
    text-shadow: 0 0 12px rgba(255, 176, 0, 0.5);
}

.fallout-page .fallout-header p {
    margin-top: 10px;
    font-size: 13px;
    color: var(--fallout-muted);
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
}


/* ── Wizard container ─────────────────────────────────────────  */
.fallout-page .wizard {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.fallout-page .step { display: none; animation: fallout-fadeUp 0.35s ease both; }
.fallout-page .step.active { display: block; }

@keyframes fallout-fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ── Progress bar ─────────────────────────────────────────────  */
.fallout-page .progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
}

.fallout-page .progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.fallout-page .progress-fill {
    height: 100%;
    background: var(--fallout-gold);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fallout-page .progress-label {
    font-size: 12px;
    color: var(--fallout-muted);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.5px;
}


/* ── Question card ────────────────────────────────────────────  */
.fallout-page .q-card {
    background: var(--fallout-bg2);
    border: 1px solid rgba(94, 255, 106, 0.18);
    border-radius: 4px;
    padding: 36px 36px 32px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(94, 255, 106, 0.05), inset 0 0 40px rgba(0, 0, 0, 0.3);
}

.fallout-page .q-number {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--fallout-gold);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.fallout-page .q-text {
    font-size: 22px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 28px;
    color: var(--fallout-text);
}

.fallout-page .options {
    display: grid;
    gap: 10px;
}

.fallout-page .option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid rgba(94, 255, 106, 0.12);
    border-radius: 3px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
    color: var(--fallout-text);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    text-align: left;
    width: 100%;
}

.fallout-page .option:hover {
    border-color: rgba(94, 255, 106, 0.5);
    background: var(--fallout-gold-dim);
    transform: translateX(4px);
    text-shadow: 0 0 8px rgba(94, 255, 106, 0.4);
}

.fallout-page .option.selected {
    border-color: var(--fallout-gold);
    background: var(--fallout-gold-dim);
    text-shadow: 0 0 8px rgba(94, 255, 106, 0.3);
}

.fallout-page .option-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--fallout-muted);
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fallout-page .option.selected .option-dot {
    background: var(--fallout-gold);
    border-color: var(--fallout-gold);
}

.fallout-page .option.selected .option-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fallout-bg);
}


/* ── Name input ───────────────────────────────────────────────  */
.fallout-page .name-input-wrap { margin-bottom: 28px; }

.fallout-page .name-input-wrap label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--fallout-gold);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.fallout-page .name-input {
    width: 100%;
    background: var(--fallout-bg2);
    border: 1px solid rgba(94, 255, 106, 0.25);
    border-radius: 3px;
    padding: 14px 18px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    color: var(--fallout-text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fallout-page .name-input:focus {
    border-color: var(--fallout-gold);
    box-shadow: 0 0 12px rgba(94, 255, 106, 0.2);
}

.fallout-page .name-input::placeholder { color: var(--fallout-muted); }


/* ── Photo upload ─────────────────────────────────────────────  */
.fallout-page .photo-upload-wrap { margin-bottom: 28px; }

.fallout-page .photo-upload-wrap label.section-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--fallout-gold);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.fallout-page .photo-upload-area {
    width: 100%;
    border: 1px dashed rgba(94, 255, 106, 0.3);
    border-radius: 3px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.fallout-page .photo-upload-area:hover {
    border-color: rgba(94, 255, 106, 0.6);
    background: var(--fallout-gold-dim);
}

.fallout-page .photo-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.fallout-page .photo-upload-icon { font-size: 28px; line-height: 1; }

.fallout-page .photo-upload-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--fallout-muted);
    text-align: center;
    pointer-events: none;
}

.fallout-page .photo-upload-sub {
    font-size: 11px;
    color: rgba(74, 122, 74, 0.7);
    letter-spacing: 0.5px;
}

.fallout-page .photo-preview-wrap {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--fallout-gold-dim);
    border: 1px solid rgba(94, 255, 106, 0.3);
    border-radius: 3px;
}

.fallout-page .photo-preview-wrap.has-photo { display: flex; }

.fallout-page .photo-thumb {
    width: 48px;
    height: 48px;
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid rgba(94, 255, 106, 0.4);
    filter: sepia(0.3) hue-rotate(90deg) saturate(1.4); /* Pip-Boy green tint */
}

.fallout-page .photo-preview-info { flex: 1; min-width: 0; }

.fallout-page .photo-preview-name {
    font-size: 13px;
    color: var(--fallout-gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fallout-page .photo-preview-status {
    font-size: 11px;
    color: var(--fallout-muted);
    margin-top: 2px;
}

.fallout-page .photo-remove-btn {
    background: none;
    border: 1px solid rgba(94, 255, 106, 0.2);
    border-radius: 2px;
    color: var(--fallout-muted);
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.fallout-page .photo-remove-btn:hover {
    border-color: rgba(255, 100, 100, 0.4);
    color: rgba(255, 120, 120, 0.8);
}


/* ── Card portrait with user photo ───────────────────────────  */
.fallout-page .card-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    filter: sepia(0.5) hue-rotate(80deg) saturate(1.6) brightness(0.75); /* Pip-Boy effect */
    z-index: 0;
}

.fallout-page .card-portrait-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(4, 26, 6, 0.15) 0%,
        rgba(4, 26, 6, 0.4) 70%,
        rgba(4, 26, 6, 0.75) 100%
    );
    z-index: 1;
}

/* Ensure name/sub/emoji sit above the photo overlay */
.fallout-page .portrait-name,
.fallout-page .portrait-sub,
.fallout-page .portrait-emoji { position: relative; z-index: 2; }


/* ── Buttons ───────────────────────────────────────────────────
   Renamed from .btn → .fallout-btn to avoid conflicting with
   the global .btn defined in the VCF converter section above.   */
.fallout-page .btn-row {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.fallout-page .fallout-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    padding: 12px 28px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    text-transform: uppercase;
}

.fallout-page .fallout-btn:hover  { transform: translateY(-1px); }
.fallout-page .fallout-btn:active { transform: translateY(0); }

.fallout-page .fallout-btn-ghost {
    background: transparent;
    border: 1px solid rgba(94, 255, 106, 0.2);
    color: var(--fallout-muted);
}

.fallout-page .fallout-btn-primary {
    background: var(--fallout-gold);
    color: #050d05;
    box-shadow: 0 0 16px rgba(94, 255, 106, 0.35);
}

.fallout-page .fallout-btn-primary:hover {
    box-shadow: 0 0 24px rgba(94, 255, 106, 0.5);
}

.fallout-page .fallout-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* ── Result section ───────────────────────────────────────────  */
#step-result {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

#step-result.active { display: flex; }

.fallout-page .result-heading { text-align: center; }

.fallout-page .result-heading h2 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 28px;
    letter-spacing: 3px;
    color: var(--fallout-gold);
    text-shadow: 0 0 16px rgba(94, 255, 106, 0.4);
    text-transform: uppercase;
}

.fallout-page .result-heading p {
    color: var(--fallout-muted);
    font-size: 14px;
    margin-top: 4px;
}


/* ── The S.P.E.C.I.A.L. card ──────────────────────────────────  */
.fallout-page .trump-card {
    width: var(--fallout-card-w);
    background: #0a130a;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid var(--fallout-gold);
    box-shadow:
        0 0 0 1px rgba(94, 255, 106, 0.1),
        0 0 40px rgba(94, 255, 106, 0.15),
        0 24px 80px rgba(0, 0, 0, 0.8);
    animation: fallout-cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fallout-cardReveal {
    from { opacity: 0; transform: scale(0.88) translateY(24px) rotateX(6deg); }
    to   { opacity: 1; transform: scale(1)    translateY(0)    rotateX(0);    }
}

.fallout-page .card-header {
    background: #040a04;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(94, 255, 106, 0.25);
}

.fallout-page .card-series {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2.5px;
    color: var(--fallout-gold);
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(94, 255, 106, 0.5);
}

.fallout-page .card-num {
    font-size: 11px;
    color: var(--fallout-muted);
}

.fallout-page .card-portrait {
    height: 160px;
    background: linear-gradient(160deg, #041a06 0%, #091209 50%, #060d06 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fallout-page .card-portrait::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(94, 255, 106, 0.12) 0%, transparent 65%);
}

.fallout-page .portrait-emoji {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 16px rgba(232, 200, 74, 0.3));
}

.fallout-page .portrait-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 24px;
    letter-spacing: 4px;
    color: var(--fallout-gold);
    position: relative;
    z-index: 1;
    text-shadow: 0 0 16px rgba(94, 255, 106, 0.6);
}

.fallout-page .portrait-sub {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--fallout-muted);
    text-transform: uppercase;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.fallout-page .card-stats { padding: 16px 20px 20px; }

.fallout-page .stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.fallout-page .stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--fallout-muted);
    width: 90px;
    flex-shrink: 0;
}

.fallout-page .bar-track {
    flex: 1;
    height: 7px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.fallout-page .bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fallout-page .stat-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--fallout-text);
    width: 24px;
    text-align: right;
    flex-shrink: 0;
}

.fallout-page .card-footer {
    background: #040a04;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(94, 255, 106, 0.15);
}

.fallout-page .total-wrap .total-label {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--fallout-muted);
    text-transform: uppercase;
}

.fallout-page .total-wrap .total-val {
    font-family: 'Share Tech Mono', monospace;
    font-size: 26px;
    color: var(--fallout-gold);
    line-height: 1;
    text-shadow: 0 0 10px rgba(94, 255, 106, 0.5);
}

.fallout-page .edition {
    font-size: 9px;
    text-align: right;
    color: var(--fallout-muted);
    letter-spacing: 1px;
    line-height: 1.6;
    text-transform: uppercase;
}


/* ── Play again button ────────────────────────────────────────  */
.fallout-page .restart-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    padding: 13px 36px;
    border-radius: 3px;
    border: 1px solid rgba(94, 255, 106, 0.35);
    background: transparent;
    color: var(--fallout-gold);
    cursor: pointer;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.fallout-page .restart-btn:hover {
    background: var(--fallout-gold-dim);
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(94, 255, 106, 0.2);
}


/* ── Score breakdown panel ────────────────────────────────────  */
.fallout-page .breakdown {
    width: var(--fallout-card-w);
    background: var(--fallout-bg2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px 24px;
}

.fallout-page .breakdown h3 {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--fallout-muted);
    margin-bottom: 14px;
}

.fallout-page .breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--fallout-text);
}

.fallout-page .breakdown-item:last-child { border-bottom: none; }
.fallout-page .breakdown-item span:last-child { color: var(--fallout-muted); font-size: 12px; }


/* ============================================================
   CERTIFICATE GENERATOR PAGE  (cert-generator.html)
   ============================================================
   Layout styles for the two-panel UI (sidebar + preview) and
   all 15 certificate themes, each scoped to .cert-theme--{id}.

   All certificate CSS is prefixed cert- to avoid any collision
   with global site styles.
   ============================================================ */

/* ── Page layout ─────────────────────────────────────────────── */

/* Fonts used across certificate themes */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Cinzel:wght@400;700&family=Josefin+Sans:wght@300;400;600&family=EB+Garamond:ital,wght@0,400;1,400&family=Raleway:wght@300;400;600&family=Share+Tech+Mono&family=VT323&family=Special+Elite&family=Bebas+Neue&family=Permanent+Marker&family=Montserrat:wght@300;400;600;700&family=Poiret+One&display=swap');

/* Two-column app shell: sidebar | preview */
.cert-app {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    min-height: 70vh;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

/* Left sidebar: controls */
.cert-sidebar {
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
}

/* Sidebar section heading */
.cert-sidebar-heading {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2px;
}

/* Input fields */
.cert-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cert-field-group label {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.65;
}

.cert-field-group input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-main);
    font-size: 0.88rem;
    padding: 9px 11px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.cert-field-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 6px var(--accent-soft);
}

/* Style picker */
.cert-picker-group-label {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0.6;
    margin: 10px 0 5px;
}

.cert-picker-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 2px;
}

.cert-style-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    padding: 9px 6px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    opacity: 0.75;
}

.cert-style-btn:hover {
    border-color: var(--accent);
    opacity: 1;
}

.cert-style-btn.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
    opacity: 1;
}

/* Print button */
.cert-print-btn {
    background: var(--accent);
    border: none;
    border-radius: 5px;
    color: var(--bg);
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 13px;
    text-transform: uppercase;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    width: 100%;
    margin-top: 6px;
}

.cert-print-btn:hover {
    opacity: 0.88;
    box-shadow: var(--shadow);
}

.cert-print-btn:active {
    transform: scale(0.98);
}

/* Right side: preview area */
.cert-preview-area {
    background: #111118;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: auto;
}

/* Wrapper constrains max width and preserves A4 landscape aspect ratio */
.cert-wrapper {
    width: 100%;
    max-width: 860px;
}

/* The actual certificate canvas — A4 landscape ratio */
.cert-canvas {
    width: 100%;
    aspect-ratio: 297 / 210;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5%;
    box-sizing: border-box;
}

/* ── Shared certificate element styles ────────────────────────
   These apply inside .cert-canvas regardless of theme.
   Font sizes use em so they scale with the canvas.              */

.cert-canvas .cert-type {
    font-size: 0.52em;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 0.3em;
    text-align: center;
}

.cert-canvas .cert-title {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 0.45em;
    text-align: center;
    line-height: 1.1;
}

.cert-canvas .cert-presented {
    font-size: 0.62em;
    letter-spacing: 0.1em;
    margin-bottom: 0.3em;
    text-align: center;
}

/* Recipient name — large and prominent */
.cert-canvas .cert-recipient {
    font-size: 1.9em;
    font-style: italic;
    margin-bottom: 0.18em;
    text-align: center;
    line-height: 1.15;
}

.cert-canvas .cert-recipient-rule {
    width: 55%;
    height: 1px;
    margin-bottom: 0.4em;
}

.cert-canvas .cert-body-text {
    font-size: 0.6em;
    letter-spacing: 0.08em;
    margin-bottom: 0.3em;
    text-align: center;
}

.cert-canvas .cert-course {
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.1em;
}

.cert-canvas .cert-sub {
    font-size: 0.68em;
    font-style: italic;
    text-align: center;
    margin-bottom: 0.45em;
}

.cert-canvas .cert-congrats {
    font-size: 0.5em;
    font-style: italic;
    text-align: center;
    margin-bottom: 0.5em;
    max-width: 75%;
    line-height: 1.5;
}

.cert-canvas .cert-footer-row {
    display: flex;
    gap: 50px;
    align-items: flex-end;
    margin-top: 0.5em;
}

.cert-canvas .cert-footer-col {
    text-align: center;
}

.cert-canvas .cert-footer-val {
    font-size: 0.62em;
    padding-bottom: 4px;
    min-width: 110px;
    letter-spacing: 0.05em;
}

.cert-canvas .cert-footer-label {
    font-size: 0.42em;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 4px;
    opacity: 0.6;
}

/* ── Shared decorative elements ───────────────────────────────  */

/* Scanlines overlay — used by several dark themes */
.cert-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(255, 255, 255, 0.025) 3px,
        rgba(255, 255, 255, 0.025) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* Ensure all content sits above scanlines */
.cert-canvas > *:not(.cert-scanlines):not(.cert-rain-col):not(.cert-starfield):not(.cert-steam-bg-gear):not(.cert-deco-corners) {
    position: relative;
    z-index: 2;
}

/* Matrix rain */
.cert-rain-col {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 14px;
    overflow: hidden;
    opacity: 0.12;
    pointer-events: none;
}
.cert-rain-inner {
    color: #00ff41;
    font-size: 9px;
    line-height: 1.1;
    animation: cert-rain-fall linear infinite;
}
@keyframes cert-rain-fall {
    from { transform: translateY(-100%); }
    to   { transform: translateY(100%); }
}

/* Scan line sweep */
.cert-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 255, 65, 0.1);
    animation: cert-scan 6s linear infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes cert-scan {
    from { top: 0; }
    to   { top: 100%; }
}

/* Starfield */
.cert-starfield {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.cert-star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
}

/* ── Title sub-line (Matrix etc.) */
.cert-canvas .cert-title-sub {
    font-size: 0.8em;
    letter-spacing: 0.3em;
    margin-bottom: 0.5em;
    text-align: center;
}

/* ── THEME: REGAL NAVY & GOLD ─────────────────────────────────── */
.cert-theme--regal {
    background: #03213d;
    font-family: 'Playfair Display', serif;
    color: #fff;
}
.cert-theme--regal .cert-outer-border {
    position: absolute; inset: 2%;
    border: 2px solid #c9a84c; pointer-events: none;
}
.cert-theme--regal .cert-inner-border {
    position: absolute; inset: 3.2%;
    border: 0.5px solid rgba(201,168,76,0.5); pointer-events: none;
}
.cert-theme--regal .cert-corner-gold {
    position: absolute; width: 26px; height: 26px;
    border-color: #c9a84c; border-style: solid;
}
.cert-theme--regal .cert-corner-gold.tl { top:3.5%; left:3.5%; border-width: 2px 0 0 2px; }
.cert-theme--regal .cert-corner-gold.tr { top:3.5%; right:3.5%; border-width: 2px 2px 0 0; }
.cert-theme--regal .cert-corner-gold.bl { bottom:3.5%; left:3.5%; border-width: 0 0 2px 2px; }
.cert-theme--regal .cert-corner-gold.br { bottom:3.5%; right:3.5%; border-width: 0 2px 2px 0; }
.cert-theme--regal .cert-type { color: #c9a84c; font-family: 'Cinzel', serif; }
.cert-theme--regal .cert-title { font-family: 'Cinzel', serif; color: #fff; font-size: 2.1em; }
.cert-theme--regal .cert-divider { display: flex; align-items: center; gap: 10px; width: 60%; margin-bottom: 0.6em; }
.cert-theme--regal .cert-div-line { flex: 1; height: 1px; background: #c9a84c; }
.cert-theme--regal .cert-div-diamond { width: 6px; height: 6px; background: #c9a84c; transform: rotate(45deg); flex-shrink: 0; }
.cert-theme--regal .cert-presented { color: #a8b8c8; font-family: 'Josefin Sans', sans-serif; }
.cert-theme--regal .cert-recipient { color: #fff; font-size: 2em; }
.cert-theme--regal .cert-recipient-rule { background: rgba(201,168,76,0.4); }
.cert-theme--regal .cert-body-text { color: #a8b8c8; font-family: 'Josefin Sans', sans-serif; }
.cert-theme--regal .cert-course { color: #c9a84c; font-size: 1.15em; }
.cert-theme--regal .cert-sub { color: #d8cba8; }
.cert-theme--regal .cert-congrats { color: #7a8a9a; }
.cert-theme--regal .cert-footer-val { color: #d8d0c0; border-bottom: 1px solid rgba(201,168,76,0.4); }
.cert-theme--regal .cert-footer-label { color: #7a8a9a; }
.cert-theme--regal .cert-seal {
    width: 58px; height: 58px; border-radius: 50%;
    border: 1.5px solid #c9a84c;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin: 0 10px;
}
.cert-theme--regal .cert-seal-star { font-size: 1.4em; color: #c9a84c; line-height: 1; }
.cert-theme--regal .cert-seal-text { font-size: 0.35em; color: #c9a84c; letter-spacing: 1px; font-family: 'Josefin Sans', sans-serif; }

/* ── THEME: MODERNIST ─────────────────────────────────────────── */
.cert-theme--modernist {
    background: #fafaf8;
    font-family: 'Raleway', sans-serif;
    color: #1a1a2e;
    display: grid;
    grid-template-columns: 10px 1fr;
    padding: 0;
    align-items: stretch;
    justify-items: stretch;
}
.cert-theme--modernist .cert-accent-bar { background: #1a1a2e; }
.cert-theme--modernist .cert-mod-content {
    padding: 6% 7% 5% 5%;
    display: flex; flex-direction: column; justify-content: space-between;
}
.cert-theme--modernist .cert-mod-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1em; }
.cert-theme--modernist .cert-type { letter-spacing: 0.3em; color: #888; font-size: 0.52em; }
.cert-theme--modernist .cert-mod-badge {
    width: 52px; height: 52px; border: 1.5px solid #1a1a2e; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
}
.cert-theme--modernist .cert-mod-badge-star { font-size: 1.1em; color: #1a1a2e; }
.cert-theme--modernist .cert-mod-badge-text { font-size: 0.28em; letter-spacing: 1px; color: #1a1a2e; font-weight: 600; }
.cert-theme--modernist .cert-mod-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cert-theme--modernist .cert-title--mod { font-size: 2.1em; font-weight: 300; letter-spacing: -1px; line-height: 1; margin-bottom: 0.3em; text-align: left; }
.cert-theme--modernist .cert-thin-rule { width: 70px; height: 2px; background: #d4af37; margin-bottom: 0.6em; }
.cert-theme--modernist .cert-presented { text-align: left; color: #888; font-weight: 300; }
.cert-theme--modernist .cert-recipient { font-size: 1.9em; font-weight: 600; font-style: normal; color: #1a1a2e; letter-spacing: -0.5px; text-align: left; }
.cert-theme--modernist .cert-body-text { text-align: left; color: #666; font-weight: 300; }
.cert-theme--modernist .cert-course { text-align: left; color: #1a1a2e; font-size: 1em; }
.cert-theme--modernist .cert-sub { text-align: left; color: #888; font-weight: 300; font-size: 0.7em; letter-spacing: 0.05em; font-style: normal; }
.cert-theme--modernist .cert-congrats { text-align: left; color: #aaa; font-size: 0.5em; max-width: 100%; }
.cert-theme--modernist .cert-footer-val { color: #1a1a2e; font-weight: 600; border-bottom: 1px solid #ccc; }
.cert-theme--modernist .cert-footer-label { color: #aaa; }

/* ── THEME: EMERALD ───────────────────────────────────────────── */
.cert-theme--emerald {
    background: #0d2818;
    font-family: 'Cormorant Garamond', serif;
    color: #e8f5e2;
}
.cert-theme--emerald .cert-emerald-frame { position: absolute; inset: 3%; border: 1px solid rgba(180,220,160,0.3); pointer-events: none; }
.cert-theme--emerald .cert-emerald-frame2 { position: absolute; inset: 4.5%; border: 2px solid rgba(160,200,130,0.12); pointer-events: none; }
.cert-theme--emerald .cert-orn-row { display: flex; align-items: center; gap: 8px; margin-bottom: 0.5em; }
.cert-theme--emerald .cert-orn-line { flex: 1; height: 1px; background: rgba(160,220,120,0.4); min-width: 30px; }
.cert-theme--emerald .cert-orn-diamond { width: 6px; height: 6px; background: #8bc34a; transform: rotate(45deg); flex-shrink: 0; }
.cert-theme--emerald .cert-type { color: #8bc34a; font-family: 'Josefin Sans', sans-serif; }
.cert-theme--emerald .cert-title { color: #e8f5e2; font-size: 2em; font-weight: 600; }
.cert-theme--emerald .cert-presented { color: rgba(200,230,180,0.6); font-style: italic; }
.cert-theme--emerald .cert-recipient { color: #fff; font-size: 2em; }
.cert-theme--emerald .cert-recipient-rule { background: rgba(139,195,74,0.3); }
.cert-theme--emerald .cert-body-text { color: rgba(200,230,180,0.6); }
.cert-theme--emerald .cert-course { color: #a5d66e; font-size: 1.1em; }
.cert-theme--emerald .cert-sub { color: rgba(200,230,180,0.7); }
.cert-theme--emerald .cert-congrats { color: rgba(200,230,180,0.4); }
.cert-theme--emerald .cert-footer-val { color: #c8e8a8; border-bottom: 1px solid rgba(139,195,74,0.3); }
.cert-theme--emerald .cert-footer-label { color: rgba(200,230,180,0.4); }

/* ── THEME: CRIMSON ───────────────────────────────────────────── */
.cert-theme--crimson {
    background: #fffef9;
    font-family: 'EB Garamond', serif;
    color: #1a0a0a;
}
.cert-theme--crimson .cert-crimson-outer { position: absolute; inset: 2.5%; border: 3px double #8b0000; pointer-events: none; }
.cert-theme--crimson .cert-crimson-inner { position: absolute; inset: 4%; border: 1px solid rgba(139,0,0,0.18); pointer-events: none; }
.cert-theme--crimson .cert-watermark { position: absolute; font-size: 12em; color: rgba(139,0,0,0.03); font-family: 'Cinzel', serif; font-weight: 700; pointer-events: none; user-select: none; z-index: 0; }
.cert-theme--crimson .cert-crest { width: 52px; height: 52px; border: 2px solid #8b0000; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 0.4em; }
.cert-theme--crimson .cert-crest-star { font-size: 1.4em; color: #8b0000; line-height: 1; }
.cert-theme--crimson .cert-type { color: #8b0000; font-family: 'Cinzel', serif; }
.cert-theme--crimson .cert-title { color: #1a0a0a; font-weight: 400; font-size: 1.9em; }
.cert-theme--crimson .cert-crimson-rule { width: 55%; height: 1px; background: #8b0000; margin-bottom: 0.6em; }
.cert-theme--crimson .cert-presented { color: #555; font-style: italic; }
.cert-theme--crimson .cert-recipient { color: #1a0a0a; font-size: 2em; }
.cert-theme--crimson .cert-recipient-rule { background: rgba(139,0,0,0.22); }
.cert-theme--crimson .cert-body-text { color: #555; }
.cert-theme--crimson .cert-course { color: #8b0000; font-size: 1.1em; }
.cert-theme--crimson .cert-sub { color: #777; }
.cert-theme--crimson .cert-congrats { color: #888; }
.cert-theme--crimson .cert-footer-val { color: #1a0a0a; border-bottom: 1px solid rgba(139,0,0,0.28); }
.cert-theme--crimson .cert-footer-label { color: #999; }

/* ── THEME: PROFESSIONAL (NEW) ────────────────────────────────── */
.cert-theme--professional {
    background: #f8f8f6;
    font-family: 'Montserrat', sans-serif;
    color: #1c2234;
    padding: 0;
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: stretch;
}
.cert-theme--professional .cert-pro-left-band {
    background: #1c2234;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: 8% 0;
}
.cert-theme--professional .cert-pro-band-logo {
    font-family: 'Montserrat', sans-serif; font-weight: 700;
    font-size: 1em; color: #c8a84c; letter-spacing: 0.1em; writing-mode: vertical-rl;
    text-orientation: mixed; transform: rotate(180deg);
}
.cert-theme--professional .cert-pro-band-rule { width: 30px; height: 1px; background: rgba(200,168,76,0.4); }
.cert-theme--professional .cert-pro-band-text {
    font-size: 0.45em; letter-spacing: 0.25em; color: rgba(255,255,255,0.3);
    text-transform: uppercase; writing-mode: vertical-rl; text-orientation: mixed;
}
.cert-theme--professional .cert-pro-body {
    padding: 5% 6% 4% 5%;
    display: flex; flex-direction: column; justify-content: space-between;
}
.cert-theme--professional .cert-pro-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 2px solid #1c2234; padding-bottom: 3%;  margin-bottom: 3%;
}
.cert-theme--professional .cert-pro-org {
    font-size: 0.55em; font-weight: 600; letter-spacing: 0.15em;
    text-transform: uppercase; color: #1c2234; opacity: 0.6;
}
.cert-theme--professional .cert-pro-ref { font-size: 0.45em; color: #999; letter-spacing: 0.05em; }
.cert-theme--professional .cert-pro-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cert-theme--professional .cert-type { text-align: left; color: #666; font-weight: 300; letter-spacing: 0.15em; font-size: 0.58em; margin-bottom: 0.15em; }
.cert-theme--professional .cert-recipient { font-size: 2em; font-style: normal; font-weight: 700; color: #1c2234; text-align: left; letter-spacing: -0.5px; margin-bottom: 0.1em; }
.cert-theme--professional .cert-pro-rule { width: 60px; height: 3px; background: #c8a84c; margin-bottom: 0.5em; }
.cert-theme--professional .cert-presented { text-align: left; font-size: 0.6em; color: #666; font-weight: 300; }
.cert-theme--professional .cert-course { text-align: left; color: #1c2234; font-size: 1.05em; font-weight: 600; }
.cert-theme--professional .cert-body-text { text-align: left; }
.cert-theme--professional .cert-sub { text-align: left; color: #888; font-style: normal; font-weight: 300; font-size: 0.65em; letter-spacing: 0.04em; }
.cert-theme--professional .cert-congrats { text-align: left; font-size: 0.52em; color: #999; max-width: 100%; font-style: italic; }
.cert-theme--professional .cert-pro-footer { display: flex; align-items: flex-end; gap: 30px; border-top: 1px solid rgba(28,34,52,0.15); padding-top: 3%; }
.cert-theme--professional .cert-footer-val { color: #1c2234; font-weight: 600; border-bottom: 1px solid rgba(28,34,52,0.25); }
.cert-theme--professional .cert-footer-label { color: #999; }
.cert-theme--professional .cert-pro-stamp {
    width: 52px; height: 52px; border: 2px solid #c8a84c; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    margin-left: auto; background: rgba(200,168,76,0.06);
}
.cert-theme--professional .cert-pro-stamp-inner { font-size: 1.5em; color: #c8a84c; line-height: 1; }

/* ── THEME: ART DECO (NEW) ────────────────────────────────────── */
.cert-theme--artdeco {
    background: #0d0a04;
    font-family: 'Poiret One', sans-serif;
    color: #f0e8c8;
}
.cert-theme--artdeco .cert-deco-bg-pattern {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        repeating-linear-gradient(45deg, rgba(212,175,55,0.03) 0, rgba(212,175,55,0.03) 1px, transparent 0, transparent 50%),
        repeating-linear-gradient(-45deg, rgba(212,175,55,0.03) 0, rgba(212,175,55,0.03) 1px, transparent 0, transparent 50%);
    background-size: 20px 20px;
}
.cert-theme--artdeco .cert-deco-outer { position: absolute; inset: 2%; border: 1px solid rgba(212,175,55,0.6); pointer-events: none; }
.cert-theme--artdeco .cert-deco-inner { position: absolute; inset: 3.5%; border: 3px solid rgba(212,175,55,0.2); pointer-events: none; }
.cert-theme--artdeco .cert-deco-top-fan {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 160px; height: 18px;
    background: linear-gradient(to bottom, #d4af37, transparent);
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
    opacity: 0.5;
}
.cert-theme--artdeco .cert-deco-left-bar {
    position: absolute; left: 6%; top: 12%; bottom: 12%;
    width: 3px; background: linear-gradient(to bottom, transparent, #d4af37 30%, #d4af37 70%, transparent);
}
.cert-theme--artdeco .cert-deco-right-bar {
    position: absolute; right: 6%; top: 12%; bottom: 12%;
    width: 3px; background: linear-gradient(to bottom, transparent, #d4af37 30%, #d4af37 70%, transparent);
}
.cert-theme--artdeco .cert-deco-corners { position: absolute; inset: 0; pointer-events: none; }
.cert-theme--artdeco .cert-deco-corner {
    position: absolute; font-size: 1.3em; color: #d4af37; line-height: 1;
}
.cert-theme--artdeco .cert-deco-corner.tl { top: 4%; left: 5%; }
.cert-theme--artdeco .cert-deco-corner.tr { top: 4%; right: 5%; }
.cert-theme--artdeco .cert-deco-corner.bl { bottom: 4%; left: 5%; }
.cert-theme--artdeco .cert-deco-corner.br { bottom: 4%; right: 5%; }
.cert-theme--artdeco .cert-type { color: rgba(212,175,55,0.7); letter-spacing: 0.35em; font-size: 0.5em; }
.cert-theme--artdeco .cert-title { color: #d4af37; font-size: 1.6em; letter-spacing: 0.18em; font-weight: 400; text-shadow: 0 0 20px rgba(212,175,55,0.3); }
.cert-theme--artdeco .cert-deco-rule { display: flex; align-items: center; gap: 10px; width: 60%; margin-bottom: 0.5em; }
.cert-theme--artdeco .cert-deco-line { flex: 1; height: 1px; background: rgba(212,175,55,0.5); }
.cert-theme--artdeco .cert-deco-gem { color: #d4af37; font-size: 0.9em; flex-shrink: 0; }
.cert-theme--artdeco .cert-presented { color: rgba(240,232,200,0.55); letter-spacing: 0.2em; }
.cert-theme--artdeco .cert-recipient { color: #fff; font-size: 2em; font-style: normal; letter-spacing: 0.12em; font-family: 'Playfair Display', serif; }
.cert-theme--artdeco .cert-body-text { color: rgba(240,232,200,0.5); letter-spacing: 0.12em; }
.cert-theme--artdeco .cert-course { color: #d4af37; font-size: 0.9em; letter-spacing: 0.1em; }
.cert-theme--artdeco .cert-sub { color: rgba(240,232,200,0.55); font-size: 0.7em; letter-spacing: 0.1em; font-style: normal; }
.cert-theme--artdeco .cert-congrats { color: rgba(240,232,200,0.3); letter-spacing: 0.15em; font-style: normal; font-size: 0.48em; }
.cert-theme--artdeco .cert-footer-val { color: #d4af37; border-bottom: 1px solid rgba(212,175,55,0.35); }
.cert-theme--artdeco .cert-footer-label { color: rgba(212,175,55,0.4); }
.cert-theme--artdeco .cert-deco-medallion { font-size: 2em; color: #d4af37; margin: 0 10px; text-shadow: 0 0 12px rgba(212,175,55,0.4); }

/* ── THEME: MODERN (NEW) ──────────────────────────────────────── */
.cert-theme--modern {
    background: #ffffff;
    font-family: 'Montserrat', sans-serif;
    color: #111;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cert-theme--modern .cert-modern-bg {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 50%, #fff8f0 100%);
}
.cert-theme--modern .cert-modern-top-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 8px;
    background: linear-gradient(90deg, #2d5be3, #a855f7, #ec4899);
}
.cert-theme--modern .cert-modern-body {
    display: grid; grid-template-columns: 1fr 200px;
    height: 100%; position: relative; z-index: 2;
    padding: 7% 5% 6% 7%;
    gap: 24px; align-items: center;
}
.cert-theme--modern .cert-modern-left {
    display: flex; flex-direction: column; justify-content: center;
}
.cert-theme--modern .cert-modern-eyebrow {
    font-size: 0.5em; font-weight: 600; letter-spacing: 0.25em;
    text-transform: uppercase; color: #888; margin-bottom: 0.5em;
}
.cert-theme--modern .cert-recipient {
    font-size: 2em; font-weight: 700; font-style: normal;
    color: #111; text-align: left; letter-spacing: -1px; line-height: 1.1;
    background: linear-gradient(135deg, #2d5be3, #a855f7);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 0.15em;
}
.cert-theme--modern .cert-modern-accent-line {
    width: 50px; height: 4px;
    background: linear-gradient(90deg, #2d5be3, #ec4899);
    border-radius: 2px; margin-bottom: 0.6em;
}
.cert-theme--modern .cert-presented { text-align: left; color: #888; font-weight: 300; font-size: 0.6em; }
.cert-theme--modern .cert-course { text-align: left; color: #111; font-size: 1.05em; font-weight: 700; }
.cert-theme--modern .cert-sub { text-align: left; font-style: normal; font-weight: 300; color: #aaa; font-size: 0.65em; letter-spacing: 0.04em; }
.cert-theme--modern .cert-congrats { text-align: left; font-size: 0.5em; color: #bbb; max-width: 100%; }
.cert-theme--modern .cert-modern-footer { display: flex; gap: 30px; align-items: flex-end; margin-top: 0.8em; border-top: 1px solid #eee; padding-top: 0.6em; }
.cert-theme--modern .cert-footer-val { color: #333; font-weight: 600; border-bottom: 1px solid #ddd; }
.cert-theme--modern .cert-footer-label { color: #aaa; }
.cert-theme--modern .cert-modern-right {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.cert-theme--modern .cert-modern-circle {
    width: 120px; height: 120px; border-radius: 50%;
    background: linear-gradient(135deg, #2d5be3, #a855f7, #ec4899);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 32px rgba(45,91,227,0.3);
}
.cert-theme--modern .cert-modern-circle-inner {
    width: 100px; height: 100px; border-radius: 50%; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.cert-theme--modern .cert-modern-star { font-size: 2em; line-height: 1; }
.cert-theme--modern .cert-modern-circle-text { font-size: 0.45em; font-weight: 700; letter-spacing: 0.1em; color: #333; text-align: center; }
.cert-theme--modern .cert-modern-vert-text {
    font-size: 0.38em; font-weight: 600; letter-spacing: 0.2em;
    text-transform: uppercase; color: #ccc;
    writing-mode: vertical-rl; text-orientation: mixed;
}

/* ── THEME: MATRIX ────────────────────────────────────────────── */
.cert-theme--matrix {
    background: #000;
    font-family: 'Share Tech Mono', monospace;
    color: #00ff41;
}
.cert-theme--matrix .cert-matrix-outer { position: absolute; inset: 2%; border: 1px solid rgba(0,255,65,0.5); pointer-events: none; }
.cert-theme--matrix .cert-matrix-inner { position: absolute; inset: 3.5%; border: 1px solid rgba(0,255,65,0.12); pointer-events: none; }
.cert-theme--matrix .cert-corner-matrix { position: absolute; width: 18px; height: 18px; border-color: #00ff41; border-style: solid; }
.cert-theme--matrix .cert-corner-matrix.tl { top:3%; left:3%; border-width: 2px 0 0 2px; }
.cert-theme--matrix .cert-corner-matrix.tr { top:3%; right:3%; border-width: 2px 2px 0 0; }
.cert-theme--matrix .cert-corner-matrix.bl { bottom:3%; left:3%; border-width: 0 0 2px 2px; }
.cert-theme--matrix .cert-corner-matrix.br { bottom:3%; right:3%; border-width: 0 2px 2px 0; }
.cert-theme--matrix .cert-type { color: rgba(0,255,65,0.55); font-size: 0.44em; }
.cert-theme--matrix .cert-title { font-size: 1.8em; text-shadow: 0 0 10px rgba(0,255,65,0.5); letter-spacing: 0.3em; }
.cert-theme--matrix .cert-title-sub { color: #00cc33; letter-spacing: 0.3em; }
.cert-theme--matrix .cert-matrix-divider { width: 60%; height: 1px; background: linear-gradient(to right, transparent, #00ff41, transparent); margin-bottom: 0.5em; }
.cert-theme--matrix .cert-presented { color: rgba(0,255,65,0.6); letter-spacing: 0.2em; }
.cert-theme--matrix .cert-recipient { color: #00ff41; text-shadow: 0 0 6px rgba(0,255,65,0.4); font-size: 1.7em; }
.cert-theme--matrix .cert-recipient-rule { background: rgba(0,255,65,0.25); }
.cert-theme--matrix .cert-body-text { color: rgba(0,255,65,0.45); letter-spacing: 0.15em; }
.cert-theme--matrix .cert-course { color: #00ff41; font-size: 0.9em; letter-spacing: 0.1em; }
.cert-theme--matrix .cert-sub { color: rgba(0,204,51,0.6); font-size: 0.55em; letter-spacing: 0.15em; font-style: normal; }
.cert-theme--matrix .cert-congrats { color: rgba(0,150,40,0.5); font-size: 0.42em; font-style: normal; letter-spacing: 0.1em; }
.cert-theme--matrix .cert-footer-val { color: #00ff41; border-bottom: 1px solid rgba(0,255,65,0.25); }
.cert-theme--matrix .cert-footer-label { color: rgba(0,150,40,0.5); }
.cert-theme--matrix .cert-hex-badge {
    width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
    position: relative; flex-shrink: 0; margin: 0 10px;
}
.cert-theme--matrix .cert-hex-inner { font-size: 0.52em; color: #00ff41; z-index: 1; text-align: center; line-height: 1.3; position: relative; }

/* ── THEME: FALLOUT ───────────────────────────────────────────── */
.cert-theme--fallout {
    background: #111200;
    font-family: 'Special Elite', cursive;
    color: #e8c800;
}
.cert-theme--fallout .cert-vault-outer { position: absolute; inset: 2%; border: 4px solid #c8a000; pointer-events: none; box-shadow: inset 0 0 30px rgba(200,160,0,0.06); }
.cert-theme--fallout .cert-vault-inner { position: absolute; inset: 3.5%; border: 1px solid rgba(200,160,0,0.3); pointer-events: none; }
.cert-theme--fallout .cert-vault-bolt { position: absolute; width: 12px; height: 12px; background: #c8a000; border-radius: 50%; }
.cert-theme--fallout .cert-vault-bolt.tl { top:3.3%; left:3.3%; }
.cert-theme--fallout .cert-vault-bolt.tr { top:3.3%; right:3.3%; }
.cert-theme--fallout .cert-vault-bolt.bl { bottom:3.3%; left:3.3%; }
.cert-theme--fallout .cert-vault-bolt.br { bottom:3.3%; right:3.3%; }
.cert-theme--fallout .cert-type { color: #c8a000; font-size: 0.48em; text-shadow: 0 0 8px rgba(200,160,0,0.3); }
.cert-theme--fallout .cert-title { color: #e8c800; font-size: 1.7em; letter-spacing: 0.18em; text-shadow: 0 0 10px rgba(232,200,0,0.2); }
.cert-theme--fallout .cert-vault-divider { display: flex; align-items: center; gap: 8px; width: 65%; margin-bottom: 0.5em; }
.cert-theme--fallout .cert-vault-line { flex: 1; height: 2px; background: linear-gradient(to right, transparent, #c8a000, transparent); }
.cert-theme--fallout .cert-vault-atom { width: 16px; height: 16px; border: 1px solid #c8a000; border-radius: 50%; position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.5em; }
.cert-theme--fallout .cert-presented { color: #a08800; letter-spacing: 0.12em; text-transform: uppercase; }
.cert-theme--fallout .cert-recipient { color: #e8c800; font-size: 1.7em; text-shadow: 0 0 6px rgba(232,200,0,0.2); }
.cert-theme--fallout .cert-recipient-rule { background: linear-gradient(to right, transparent, rgba(200,160,0,0.35), transparent); height: 2px; }
.cert-theme--fallout .cert-body-text { color: #887700; letter-spacing: 0.08em; text-transform: uppercase; }
.cert-theme--fallout .cert-course { color: #c8a000; font-size: 1em; }
.cert-theme--fallout .cert-sub { color: #887700; font-size: 0.58em; letter-spacing: 0.05em; font-style: normal; }
.cert-theme--fallout .cert-congrats { color: #554400; font-style: italic; font-size: 0.45em; }
.cert-theme--fallout .cert-footer-val { color: #c8a000; border-bottom: 2px solid rgba(200,160,0,0.3); }
.cert-theme--fallout .cert-footer-label { color: #554400; }
.cert-theme--fallout .cert-pip-boy {
    width: 52px; height: 52px; border: 2px solid #c8a000; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(200,160,0,0.04); flex-shrink: 0; margin: 0 10px;
}
.cert-theme--fallout .cert-pip-screen { font-size: 0.52em; color: #c8a000; text-align: center; line-height: 1.4; text-shadow: 0 0 4px rgba(200,160,0,0.4); }

/* ── THEME: CYBERPUNK ─────────────────────────────────────────── */
.cert-theme--cyberpunk {
    background: #07001a;
    font-family: 'Josefin Sans', sans-serif;
    color: #fff;
}
.cert-theme--cyberpunk .cert-cyber-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,0,200,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,0,200,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
}
.cert-theme--cyberpunk .cert-cyber-hbar { position: absolute; left: 5%; right: 5%; height: 2px; background: linear-gradient(to right, transparent, #ff00c8, cyan, #ff00c8, transparent); pointer-events: none; }
.cert-theme--cyberpunk .cert-cyber-hbar--top { top: 5%; }
.cert-theme--cyberpunk .cert-cyber-hbar--bot { bottom: 5%; }
.cert-theme--cyberpunk .cert-cyber-vbar { position: absolute; top: 5%; bottom: 5%; width: 2px; background: linear-gradient(to bottom, transparent, #ff00c8, cyan, #ff00c8, transparent); pointer-events: none; }
.cert-theme--cyberpunk .cert-cyber-vbar--left { left: 5%; }
.cert-theme--cyberpunk .cert-cyber-vbar--right { right: 5%; }
.cert-theme--cyberpunk .cert-type { color: #ff00c8; font-size: 0.48em; text-shadow: 2px 0 cyan, -1px 0 #ff00c8; }
.cert-theme--cyberpunk .cert-title { font-weight: 600; letter-spacing: 0.22em; font-size: 1.8em; text-shadow: 0 0 10px cyan, 0 0 20px #ff00c8; }
.cert-theme--cyberpunk .cert-cyber-rule { display: flex; align-items: center; gap: 10px; width: 65%; margin-bottom: 0.5em; }
.cert-theme--cyberpunk .cert-cyber-line--left { flex: 1; height: 1px; background: linear-gradient(to right, transparent, cyan); }
.cert-theme--cyberpunk .cert-cyber-line--right { flex: 1; height: 1px; background: linear-gradient(to left, transparent, #ff00c8); }
.cert-theme--cyberpunk .cert-cyber-dot { width: 6px; height: 6px; background: cyan; border-radius: 50%; box-shadow: 0 0 8px cyan; flex-shrink: 0; }
.cert-theme--cyberpunk .cert-presented { color: rgba(0,255,255,0.45); letter-spacing: 0.2em; }
.cert-theme--cyberpunk .cert-recipient { color: cyan; text-shadow: 0 0 8px cyan; font-size: 1.7em; letter-spacing: 0.1em; }
.cert-theme--cyberpunk .cert-recipient-rule { background: linear-gradient(to right, transparent, cyan, transparent); }
.cert-theme--cyberpunk .cert-body-text { color: rgba(255,255,255,0.38); letter-spacing: 0.1em; }
.cert-theme--cyberpunk .cert-course { color: #ff00c8; text-shadow: 0 0 6px #ff00c8; font-size: 0.9em; letter-spacing: 0.1em; }
.cert-theme--cyberpunk .cert-sub { color: rgba(0,255,255,0.45); font-size: 0.55em; letter-spacing: 0.2em; font-style: normal; }
.cert-theme--cyberpunk .cert-congrats { color: rgba(255,255,255,0.28); font-size: 0.42em; font-style: normal; letter-spacing: 0.1em; }
.cert-theme--cyberpunk .cert-footer-val { color: cyan; border-bottom: 1px solid rgba(0,255,255,0.28); text-shadow: 0 0 4px cyan; }
.cert-theme--cyberpunk .cert-footer-label { color: rgba(255,0,200,0.4); }
.cert-theme--cyberpunk .cert-cyber-badge { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; margin: 0 10px; }
.cert-theme--cyberpunk .cert-cyber-badge-ring { position: absolute; inset: 0; border: 1px solid cyan; transform: rotate(45deg); opacity: 0.5; }
.cert-theme--cyberpunk .cert-cyber-badge-inner { font-size: 0.5em; color: cyan; text-align: center; line-height: 1.3; text-shadow: 0 0 4px cyan; position: relative; z-index: 1; }

/* ── THEME: STEAMPUNK ─────────────────────────────────────────── */
.cert-theme--steampunk {
    background: #160c00;
    font-family: 'EB Garamond', serif;
    color: #e8a840;
}
.cert-theme--steampunk .cert-steam-bg-gear { position: absolute; opacity: 0.04; font-size: 17em; color: #c87c00; pointer-events: none; user-select: none; top: 50%; left: 50%; transform: translate(-50%,-50%); line-height: 1; display: block; }
.cert-theme--steampunk .cert-steam-outer { position: absolute; inset: 2%; border: 2px solid #7a4e00; pointer-events: none; }
.cert-theme--steampunk .cert-steam-mid { position: absolute; inset: 3%; border: 1px solid rgba(122,78,0,0.4); pointer-events: none; }
.cert-theme--steampunk .cert-steam-inner { position: absolute; inset: 4%; border: 1px solid rgba(122,78,0,0.18); pointer-events: none; }
.cert-theme--steampunk .cert-steam-cog { position: absolute; font-size: 1.5em; color: #7a4e00; }
.cert-theme--steampunk .cert-steam-cog.tl { top:2.5%; left:2.5%; }
.cert-theme--steampunk .cert-steam-cog.tr { top:2.5%; right:2.5%; }
.cert-theme--steampunk .cert-steam-cog.bl { bottom:2.5%; left:2.5%; }
.cert-theme--steampunk .cert-steam-cog.br { bottom:2.5%; right:2.5%; }
.cert-theme--steampunk .cert-type { color: #7a4e00; font-family: 'Josefin Sans', sans-serif; font-size: 0.46em; letter-spacing: 0.3em; }
.cert-theme--steampunk .cert-title { color: #c87c00; font-size: 1.8em; font-weight: 400; letter-spacing: 0.1em; }
.cert-theme--steampunk .cert-steam-divider { display: flex; align-items: center; gap: 8px; width: 65%; margin-bottom: 0.5em; }
.cert-theme--steampunk .cert-steam-line { flex: 1; height: 3px; background: linear-gradient(to right, #3a1800, #7a4e00, #3a1800); }
.cert-theme--steampunk .cert-steam-bolt { width: 10px; height: 10px; background: #7a4e00; border-radius: 50%; flex-shrink: 0; }
.cert-theme--steampunk .cert-presented { color: #5a3800; font-style: italic; }
.cert-theme--steampunk .cert-recipient { color: #e8a840; font-size: 1.8em; }
.cert-theme--steampunk .cert-recipient-rule { background: linear-gradient(to right, transparent, #7a4e00, transparent); height: 2px; }
.cert-theme--steampunk .cert-body-text { color: #5a3800; }
.cert-theme--steampunk .cert-course { color: #c87c00; font-size: 1.05em; }
.cert-theme--steampunk .cert-sub { color: #7a4e00; font-size: 0.62em; }
.cert-theme--steampunk .cert-congrats { color: #3a2000; font-size: 0.46em; }
.cert-theme--steampunk .cert-footer-val { color: #c87c00; border-bottom: 2px solid rgba(122,78,0,0.35); }
.cert-theme--steampunk .cert-footer-label { color: #3a2000; }
.cert-theme--steampunk .cert-steam-seal { font-size: 2.2em; color: #7a4e00; margin: 0 12px; flex-shrink: 0; }

/* ── THEME: IRON MAN ──────────────────────────────────────────── */
.cert-theme--ironman {
    background: #120000;
    font-family: 'Josefin Sans', sans-serif;
    color: #ffe8d2;
}
.cert-theme--ironman .cert-iron-bg {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at top, #2a0000, #120000 60%);
}
.cert-theme--ironman .cert-iron-outer { position: absolute; inset: 2%; border: 2px solid #ff3300; pointer-events: none; box-shadow: inset 0 0 20px rgba(255,51,0,0.08), 0 0 15px rgba(255,51,0,0.15); }
.cert-theme--ironman .cert-iron-inner { position: absolute; inset: 3.5%; border: 1px solid rgba(255,51,0,0.2); pointer-events: none; }
.cert-theme--ironman .cert-corner-iron { position: absolute; width: 22px; height: 22px; border-color: #ffcc00; border-style: solid; }
.cert-theme--ironman .cert-corner-iron.tl { top:3%; left:3%; border-width: 2px 0 0 2px; }
.cert-theme--ironman .cert-corner-iron.tr { top:3%; right:3%; border-width: 2px 2px 0 0; }
.cert-theme--ironman .cert-corner-iron.bl { bottom:3%; left:3%; border-width: 0 0 2px 2px; }
.cert-theme--ironman .cert-corner-iron.br { bottom:3%; right:3%; border-width: 0 2px 2px 0; }
.cert-theme--ironman .cert-iron-hud-top { font-size: 0.4em; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,204,0,0.45); margin-bottom: 0.2em; text-align: center; }
.cert-theme--ironman .cert-type { color: rgba(255,204,0,0.6); font-size: 0.46em; letter-spacing: 0.2em; }
.cert-theme--ironman .cert-title { color: #ffcc00; font-size: 1.75em; text-shadow: 0 0 12px rgba(255,204,0,0.4); letter-spacing: 0.15em; }
.cert-theme--ironman .cert-iron-arc { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 0.4em; }
.cert-theme--ironman .cert-iron-arc-ring { width: 32px; height: 32px; border: 1.5px solid rgba(255,204,0,0.4); border-radius: 50%; }
.cert-theme--ironman .cert-iron-arc-core { font-size: 1.2em; color: #ffcc00; text-shadow: 0 0 8px rgba(255,204,0,0.5); }
.cert-theme--ironman .cert-presented { color: rgba(255,204,0,0.5); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.56em; }
.cert-theme--ironman .cert-recipient { color: #ffcc00; font-size: 1.75em; text-shadow: 0 0 8px rgba(255,204,0,0.3); font-style: normal; letter-spacing: 0.05em; }
.cert-theme--ironman .cert-recipient-rule { background: linear-gradient(to right, transparent, rgba(255,51,0,0.5), transparent); }
.cert-theme--ironman .cert-body-text { color: rgba(255,232,210,0.45); letter-spacing: 0.1em; }
.cert-theme--ironman .cert-course { color: #ff3300; font-size: 1em; text-shadow: 0 0 6px rgba(255,51,0,0.4); }
.cert-theme--ironman .cert-sub { color: rgba(255,232,210,0.4); font-style: normal; font-size: 0.6em; letter-spacing: 0.08em; }
.cert-theme--ironman .cert-congrats { color: rgba(255,232,210,0.3); font-size: 0.45em; font-style: italic; }
.cert-theme--ironman .cert-footer-val { color: #ffcc00; border-bottom: 1px solid rgba(255,204,0,0.3); }
.cert-theme--ironman .cert-footer-label { color: rgba(255,51,0,0.4); }
.cert-theme--ironman .cert-iron-badge { width: 52px; height: 52px; border: 2px solid rgba(255,204,0,0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 0 10px; background: rgba(255,51,0,0.06); }
.cert-theme--ironman .cert-iron-badge-text { font-size: 1.6em; color: #ffcc00; text-shadow: 0 0 8px rgba(255,204,0,0.5); }

/* ── THEME: HULK ──────────────────────────────────────────────── */
.cert-theme--hulk {
    background: #020803;
    font-family: 'Bebas Neue', cursive;
    color: #d8ffd8;
    letter-spacing: 0.08em;
}
.cert-theme--hulk .cert-hulk-bg {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at bottom, #041208, #020803 70%);
}
.cert-theme--hulk .cert-hulk-outer { position: absolute; inset: 2%; border: 3px solid #4cff4c; pointer-events: none; box-shadow: 0 0 20px rgba(76,255,76,0.25), inset 0 0 15px rgba(76,255,76,0.06); }
.cert-theme--hulk .cert-hulk-inner { position: absolute; inset: 3.5%; border: 1px solid rgba(76,255,76,0.18); pointer-events: none; }
.cert-theme--hulk .cert-corner-hulk { position: absolute; width: 24px; height: 24px; border-color: #4cff4c; border-style: solid; }
.cert-theme--hulk .cert-corner-hulk.tl { top:3%; left:3%; border-width: 3px 0 0 3px; }
.cert-theme--hulk .cert-corner-hulk.tr { top:3%; right:3%; border-width: 3px 3px 0 0; }
.cert-theme--hulk .cert-corner-hulk.bl { bottom:3%; left:3%; border-width: 0 0 3px 3px; }
.cert-theme--hulk .cert-corner-hulk.br { bottom:3%; right:3%; border-width: 0 3px 3px 0; }
.cert-theme--hulk .cert-hulk-smash-text { position: absolute; font-size: 9em; color: rgba(76,255,76,0.03); font-weight: 700; pointer-events: none; user-select: none; letter-spacing: -5px; }
.cert-theme--hulk .cert-type { color: rgba(76,255,76,0.55); font-size: 0.48em; }
.cert-theme--hulk .cert-title { color: #4cff4c; font-size: 1.6em; text-shadow: 0 0 15px rgba(76,255,76,0.5); }
.cert-theme--hulk .cert-hulk-rule { width: 65%; height: 3px; background: linear-gradient(to right, transparent, #4cff4c, transparent); margin-bottom: 0.3em; }
.cert-theme--hulk .cert-presented { color: rgba(76,255,76,0.55); font-size: 0.55em; text-transform: uppercase; }
.cert-theme--hulk .cert-recipient { color: #4cff4c; font-size: 1.6em; text-shadow: 0 0 8px rgba(76,255,76,0.4); font-style: normal; }
.cert-theme--hulk .cert-recipient-rule { background: linear-gradient(to right, transparent, rgba(76,255,76,0.4), transparent); height: 2px; }
.cert-theme--hulk .cert-body-text { color: rgba(76,255,76,0.45); text-transform: uppercase; font-size: 0.58em; }
.cert-theme--hulk .cert-course { color: #d8ffd8; font-size: 1em; }
.cert-theme--hulk .cert-sub { color: rgba(76,255,76,0.4); font-style: normal; font-size: 0.58em; }
.cert-theme--hulk .cert-congrats { color: rgba(76,255,76,0.3); font-size: 0.44em; font-style: normal; }
.cert-theme--hulk .cert-footer-val { color: #4cff4c; border-bottom: 2px solid rgba(76,255,76,0.3); }
.cert-theme--hulk .cert-footer-label { color: rgba(76,255,76,0.35); }
.cert-theme--hulk .cert-hulk-fist { font-size: 2em; margin: 0 10px; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(76,255,76,0.5)); }

/* ── THEME: THOR ──────────────────────────────────────────────── */
.cert-theme--thor {
    background: #020414;
    font-family: 'Cinzel', serif;
    color: #e6f0ff;
}
.cert-theme--thor .cert-thor-bg {
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at top, #001f3f, #020414 70%);
}
.cert-theme--thor .cert-thor-outer { position: absolute; inset: 2%; border: 2px solid #87cefa; pointer-events: none; box-shadow: 0 0 20px rgba(135,206,250,0.2), inset 0 0 20px rgba(135,206,250,0.04); }
.cert-theme--thor .cert-thor-inner { position: absolute; inset: 3.5%; border: 1px solid rgba(135,206,250,0.15); pointer-events: none; }
.cert-theme--thor .cert-corner-thor { position: absolute; width: 22px; height: 22px; border-color: #ffd700; border-style: solid; }
.cert-theme--thor .cert-corner-thor.tl { top:3%; left:3%; border-width: 2px 0 0 2px; }
.cert-theme--thor .cert-corner-thor.tr { top:3%; right:3%; border-width: 2px 2px 0 0; }
.cert-theme--thor .cert-corner-thor.bl { bottom:3%; left:3%; border-width: 0 0 2px 2px; }
.cert-theme--thor .cert-corner-thor.br { bottom:3%; right:3%; border-width: 0 2px 2px 0; }
.cert-theme--thor .cert-thor-lightning {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 2px; height: 100%;
    background: linear-gradient(to bottom, rgba(135,206,250,0.15), transparent 40%, transparent 60%, rgba(135,206,250,0.1));
    pointer-events: none;
}
.cert-theme--thor .cert-type { color: rgba(135,206,250,0.55); font-size: 0.46em; letter-spacing: 0.2em; }
.cert-theme--thor .cert-title { color: #ffd700; font-size: 1.75em; text-shadow: 0 0 12px rgba(135,206,250,0.4); letter-spacing: 0.15em; }
.cert-theme--thor .cert-thor-hammer { font-size: 1.8em; margin-bottom: 0.2em; filter: drop-shadow(0 0 8px rgba(135,206,250,0.4)); }
.cert-theme--thor .cert-presented { color: rgba(230,240,255,0.55); font-style: italic; font-size: 0.6em; }
.cert-theme--thor .cert-recipient { color: #87cefa; font-size: 1.75em; text-shadow: 0 0 8px rgba(135,206,250,0.4); }
.cert-theme--thor .cert-recipient-rule { background: linear-gradient(to right, transparent, rgba(255,215,0,0.4), transparent); }
.cert-theme--thor .cert-body-text { color: rgba(230,240,255,0.45); font-style: italic; font-size: 0.6em; }
.cert-theme--thor .cert-course { color: #ffd700; font-size: 1.05em; }
.cert-theme--thor .cert-sub { color: rgba(135,206,250,0.45); font-size: 0.62em; font-style: italic; }
.cert-theme--thor .cert-congrats { color: rgba(230,240,255,0.3); font-size: 0.45em; font-style: italic; }
.cert-theme--thor .cert-footer-val { color: #87cefa; border-bottom: 1px solid rgba(135,206,250,0.28); }
.cert-theme--thor .cert-footer-label { color: rgba(135,206,250,0.35); }
.cert-theme--thor .cert-thor-seal { font-size: 2em; color: #ffd700; margin: 0 12px; flex-shrink: 0; text-shadow: 0 0 12px rgba(255,215,0,0.5); }

/* ── THEME: K-POP ─────────────────────────────────────────────── */
.cert-theme--kpop {
    background: #ffe6f7;
    font-family: 'Raleway', sans-serif;
    color: #4a004e;
}
.cert-theme--kpop .cert-kpop-bg {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, #ffd6f0, #ffe6f7, #f0d6ff);
}
.cert-theme--kpop .cert-kpop-outer { position: absolute; inset: 2%; border: 2px solid #ff3bd4; border-radius: 8px; pointer-events: none; box-shadow: 0 0 20px rgba(255,59,212,0.2); }
.cert-theme--kpop .cert-kpop-sparkles { font-size: 1em; color: #ff3bd4; letter-spacing: 0.3em; margin-bottom: 0.2em; text-shadow: 0 0 8px rgba(255,59,212,0.4); }
.cert-theme--kpop .cert-type { color: #ff3bd4; letter-spacing: 0.2em; font-weight: 600; text-shadow: 0 0 6px rgba(255,59,212,0.3); }
.cert-theme--kpop .cert-title { color: #4a004e; font-size: 1.7em; font-weight: 700; letter-spacing: -0.5px; }
.cert-theme--kpop .cert-kpop-hearts { font-size: 1.1em; color: #ff3bd4; letter-spacing: 0.5em; margin-bottom: 0.3em; }
.cert-theme--kpop .cert-presented { color: #7a1a7a; font-weight: 300; font-size: 0.62em; }
.cert-theme--kpop .cert-recipient { color: #4a004e; font-size: 2em; font-weight: 700; font-style: normal; }
.cert-theme--kpop .cert-kpop-rule { width: 55%; height: 3px; background: linear-gradient(90deg, #ff3bd4, #c084fc, #ff3bd4); border-radius: 2px; margin-bottom: 0.4em; }
.cert-theme--kpop .cert-recipient-rule { display: none; }
.cert-theme--kpop .cert-body-text { color: #7a1a7a; font-weight: 300; }
.cert-theme--kpop .cert-course { color: #4a004e; font-size: 1em; }
.cert-theme--kpop .cert-sub { color: #9a4a9a; font-style: normal; font-weight: 300; font-size: 0.68em; }
.cert-theme--kpop .cert-congrats { color: #c084fc; font-style: italic; font-size: 0.5em; }
.cert-theme--kpop .cert-footer-val { color: #4a004e; font-weight: 600; border-bottom: 2px solid rgba(255,59,212,0.4); }
.cert-theme--kpop .cert-footer-label { color: #c084fc; }
.cert-theme--kpop .cert-kpop-star { font-size: 2.2em; flex-shrink: 0; margin: 0 10px; filter: drop-shadow(0 0 6px rgba(255,59,212,0.5)); }

/* ── Print styles ─────────────────────────────────────────────── */
@media print {
    @page { size: A4 landscape; margin: 0; }
    /* Hide everything except the certificate canvas */
    body > * { visibility: hidden; }
    .cert-canvas, .cert-canvas * { visibility: visible; }
    .cert-canvas {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        width: 100vw !important; height: 100vh !important;
        aspect-ratio: unset !important;
        border-radius: 0 !important;
    }
}

/* ── Responsive: stack sidebar below preview on narrow screens ── */
@media (max-width: 820px) {
    .cert-app {
        grid-template-columns: 1fr;
    }
    .cert-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .cert-preview-area {
        padding: 16px;
    }
}
/* ============================================
   2026-04-14 : PRINT STYLES - Hide everything except certificate
   ============================================ */
@media print {
    
    /* Hide all non-certificate elements */
    header,
    #nav-placeholder,
    .cert-sidebar,
    .cert-print-btn,
    #info-panel,
    footer,
    #page-content > h2,
    #page-content > p {
        display: none !important;
    }
    
    /* Ensure the certificate wrapper takes full page */
    .cert-preview-area,
    .cert-wrapper,
    #cert-canvas {
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* Remove any extra spacing from body and main */
    body, main, #page-content, .cert-app {
        margin: 0;
        padding: 0;
        background: white;
    }
    
    /* Force certificate to one page */
    .cert-wrapper {
        page-break-inside: avoid;
        break-inside: avoid;
        page-break-before: avoid;
        page-break-after: avoid;
    }
    
    /* Set landscape orientation for the print dialog */
    @page {
        size: landscape;
        margin: 0.5cm;
    }
    
    /* Ensure certificate content stays within one page */
    #cert-canvas {
        page-break-inside: avoid;
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ========================================================= */
/*  OCR TOOL — LAYOUT & VISUAL STYLES                        */
/*  This CSS supports the HTML added in Step 1               */
/*  It is fully theme-aware and mobile-first                 */
/* ========================================================= */


/* 
   MAIN CONTAINER
   Provides spacing and ensures the tool fits nicely inside
   your existing template layout.
*/
#ocr-tool-container {
    width: 100%;
    max-width: 1200px; /* Keeps content readable on large screens */
    margin: 0 auto;
    padding: 20px;
}


/* ========================================================= */
/*  INPUT SECTION                                             */
/* ========================================================= */

.ocr-input-section {
    text-align: center;
    margin-bottom: 25px;
}


/* 
   UPLOAD BUTTON
   Styled to match your existing button styles but isolated
   so it won't interfere with global button rules.
*/
#ocr-upload-btn {
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;

    /* Theme-aware colours */
    background: var(--accent);
    color: var(--text-on-accent);

    border: none;
    border-radius: 6px;

    transition: background 0.2s ease;
}

#ocr-upload-btn:hover {
    background: var(--accent-hover);
}


/* 
   DRAG & DROP ZONE
   A visually distinct area encouraging interaction.
   Uses dashed border to indicate "drop here".
*/
#ocr-drop-zone {
    margin: 20px auto;
    padding: 30px 20px;

    border: 2px dashed var(--border);
    border-radius: 10px;

    background: var(--panel);
    color: var(--text);

    max-width: 600px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

/* Highlight when dragging a file over the zone */
#ocr-drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--panel-hover);
}


/* 
   PASTE INFO
   Simple text block explaining paste support.
*/
#ocr-paste-info {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}


/* ========================================================= */
/*  RESULTS SECTION                                           */
/* ========================================================= */

/* 
   WRAPPER FOR SIDE-BY-SIDE LAYOUT
   Mobile-first: stacked vertically
   Desktop: flex row
*/
#ocr-results-wrapper {
    display: flex;
    flex-direction: column; /* Mobile default */
    gap: 20px;
}

/* Desktop layout: side-by-side */
@media (min-width: 900px) {
    #ocr-results-wrapper {
        flex-direction: row;
    }
}


/* 
   PANELS (Left = Image, Right = Text)
   These match your existing card/panel style.
*/
.ocr-panel {
    flex: 1;
    padding: 20px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;

    box-shadow: var(--shadow);
}

.ocr-panel h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--text-strong);
}


/* 
   IMAGE PREVIEW AREA
   Ensures images scale correctly and never overflow.
*/
#ocr-image-preview {
    width: 100%;
    min-height: 150px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    border-radius: 8px;
    background: var(--panel-alt);
    border: 1px dashed var(--border);
}

#ocr-image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* 
   EXTRACTED TEXT AREA
   Uses <pre> so formatting is preserved.
   Scrollable if text is long.
*/
#ocr-output-text {
    white-space: pre-wrap; /* Allows wrapping inside <pre> */
    background: var(--panel-alt);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);

    max-height: 500px;
    overflow-y: auto;
    font-family: var(--mono-font, monospace);
    font-size: 0.95rem;
}
/* ========================================================= */
/*  OCR TOOL — TEXT PANEL TOOLBAR                            */
/* ========================================================= */

#ocr-text-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
