/* ══════════════════════════════════════════════════════════════
   FLEXCARD.CSS — Flex Card Generator specific styles
   Requires: base.css
   ══════════════════════════════════════════════════════════════ */

/* --- Background Doodles --- */
.bg-deco {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.doodle {
    position: absolute;
    color: var(--purple);
    font-size: 24px;
    font-weight: bold;
    opacity: 0.15;
}

.doodle.d1 {
    top: 10%;
    left: 5%;
    font-size: 30px;
}

.doodle.d2 {
    top: 20%;
    right: 10%;
    width: 15px;
    height: 15px;
    background: var(--coral);
    border-radius: 50%;
    color: transparent;
    opacity: 0.2;
}

.doodle.d3 {
    top: 40%;
    left: 8%;
    font-size: 20px;
}

.doodle.d4 {
    top: 15%;
    right: 25%;
    font-size: 28px;
    color: var(--coral);
    opacity: 0.2;
}

.doodle.d5 {
    top: 70%;
    left: 15%;
    font-size: 26px;
}

.doodle.d6 {
    top: 60%;
    right: 8%;
    width: 10px;
    height: 10px;
    background: var(--text-light);
    border-radius: 50%;
    color: transparent;
    opacity: 0.2;
}

.doodle.d7 {
    top: 85%;
    right: 20%;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid var(--purple);
    color: transparent;
    opacity: 0.2;
}

.doodle.d8 {
    top: 50%;
    right: 30%;
    font-size: 22px;
}

.doodle.d9 {
    top: 80%;
    left: 30%;
    font-size: 18px;
}

.doodle.d10 {
    top: 30%;
    left: 25%;
    width: 12px;
    height: 12px;
    background: var(--yellow);
    border-radius: 50%;
    color: transparent;
    opacity: 0.2;
}

.doodle.d11 {
    bottom: 10%;
    left: 10%;
    font-size: 24px;
    color: var(--yellow);
    opacity: 0.2;
}

.doodle.d12 {
    top: 5%;
    left: 40%;
    font-size: 20px;
}

.doodle.d13 {
    bottom: 20%;
    right: 35%;
    width: 18px;
    height: 18px;
    background: var(--blue);
    border-radius: 50%;
    color: transparent;
    opacity: 0.2;
}

.doodle.d14 {
    top: 25%;
    left: 60%;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 24px solid var(--mint);
    color: transparent;
    opacity: 0.2;
    transform: rotate(45deg);
}

.doodle.d15 {
    bottom: 5%;
    right: 5%;
    font-size: 35px;
}

.doodle.d16 {
    top: 45%;
    left: 50%;
    font-size: 16px;
    opacity: 0.2;
}


.hero {
    text-align: center;
    padding: 56px 24px 28px;
}

.hero h1 {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: clamp(2rem, 5.5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--pink), var(--purple), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 440px;
    margin: 0 auto;
}

.fun-divider {
    text-align: center;
    padding: 0 24px;
    margin-bottom: 16px;
    position: relative;
}

.fun-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue), var(--mint), var(--yellow));
    opacity: 0.3;
}

.fun-divider span {
    background: var(--bg);
    padding: 0 20px;
    position: relative;
    font-size: 1.4rem;
}

/* User Input Section */
.input-section {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 20px 32px;
}

.input-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 8px 40px var(--shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue), var(--mint), var(--yellow));
    border-radius: 28px 28px 0 0;
}

.input-card label {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
}

.username-input {
    background: #faf5ff;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 1rem;
    color: var(--text);
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 600;
    transition: all 0.25s;
    outline: none;
    text-align: center;
}

.username-input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.15);
}

.btn-generate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    border: none;
    border-radius: 100px;
    color: white;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.35);
    letter-spacing: 0.02em;
    width: 100%;
}

.btn-generate:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 107, 157, 0.45);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f0e4f7;
    border-top-color: var(--pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    background: linear-gradient(135deg, var(--pink), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-msg {
    color: var(--coral);
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    margin-top: -5px;
    display: none;
}

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    bottom: 40px;
}

/* 
===============================================
FLEX CARD GENERATOR - The Core Display
=============================================== 
*/

.card-section {
    display: none;
    /* Hidden until generated */
    flex-direction: column;
    align-items: center;
    padding: 0 20px 20px;
}

.card-outer {
    background: transparent;
    padding: 0;
    /* Removed thick white border per request */
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.flex-card {
    width: 290px;
    height: 560px;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    color: white;
    /* Mostly white text inside */
    background: #0f4c6e;
    /* Default dark background before themes */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* Glassmorphism Borders */
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.15);
}

/* Background image overlay */
.flex-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    /* Blend with base color */
    pointer-events: none;
    z-index: 1;
}

/* Theme Backgrounds */
.flex-card.theme-bubblegum {
    background: linear-gradient(135deg, #d1477a, #e87aab, #f0a0c4);
    border-color: rgba(240, 160, 200, 0.4);
}

.flex-card.theme-pastel {
    background: linear-gradient(135deg, #8e7ab5, #b8a0d2, #d4c0e8);
    border-color: rgba(200, 170, 230, 0.5);
}

.flex-card.theme-neon {
    background: linear-gradient(135deg, #0a0020, #1a0f35, #2b0a45);
    border-color: rgba(0, 255, 150, 0.5);
}

.flex-card.theme-galaxy {
    background: linear-gradient(135deg, #0c0827, #1a1050, #2a0c52);
    border-color: rgba(130, 80, 220, 0.4);
}

.flex-card.theme-ocean {
    background: linear-gradient(135deg, #0a2e52, #0b457c, #1565a8);
    border-color: rgba(60, 150, 220, 0.4);
}

.flex-card.theme-fire {
    background: linear-gradient(135deg, #5c0a00, #9c2b0a, #c44218);
    border-color: rgba(255, 120, 50, 0.4);
}

.flex-card.theme-dark {
    background: linear-gradient(135deg, #111113, #1a1b1d, #222226);
    border-color: rgba(100, 100, 110, 0.4);
}

.flex-card.theme-sunset {
    background: linear-gradient(135deg, #6b2040, #c25535, #e88a30);
    border-color: rgba(230, 140, 60, 0.4);
}

.flex-card.theme-gold {
    background: linear-gradient(135deg, #4a3000, #8a6914, #c9a020);
    border-color: rgba(210, 175, 55, 0.5);
}

.flex-card.theme-stardust {
    background: linear-gradient(135deg, #1a0a30, #2d1b69, #4a2c8a);
    border-color: rgba(140, 100, 220, 0.4);
}

.flex-card.theme-heartbeat {
    background: linear-gradient(135deg, #5a0020, #a01040, #cc2060);
    border-color: rgba(230, 80, 130, 0.4);
}

.flex-card.theme-crosshair {
    background: linear-gradient(135deg, #1a2332, #2a3a4c, #1e2d3d);
    border-color: rgba(80, 120, 160, 0.4);
}

.flex-card.theme-dotwave {
    background: linear-gradient(135deg, #0d2137, #1a3a5c, #0f2b4a);
    border-color: rgba(60, 120, 180, 0.4);
}

.flex-card.theme-trianglepeak {
    background: linear-gradient(135deg, #0a2e1a, #1a5a35, #2a7a4a);
    border-color: rgba(60, 200, 100, 0.4);
}

.flex-card.theme-blossom {
    background: linear-gradient(135deg, #6b2050, #c46a8a, #e8a0b0);
    border-color: rgba(230, 150, 180, 0.4);
}

.flex-card.theme-midnight {
    background: linear-gradient(135deg, #050510, #0c1030, #141e4a);
    border-color: rgba(40, 50, 120, 0.5);
}

.flex-card.theme-coral {
    background: linear-gradient(135deg, #8a3030, #d06050, #e88070);
    border-color: rgba(240, 140, 120, 0.4);
}

.flex-card.theme-arctic {
    background: linear-gradient(135deg, #1a4060, #3a7a9a, #5aaac0);
    border-color: rgba(140, 210, 240, 0.4);
}

.flex-card.theme-ember {
    background: linear-gradient(135deg, #4a1500, #8a3500, #c05500);
    border-color: rgba(230, 140, 40, 0.4);
}

.flex-card.theme-lavender {
    background: linear-gradient(135deg, #4a3070, #7b52a0, #a87cc8);
    border-color: rgba(168, 124, 200, 0.4);
}

.flex-card.theme-cherry {
    background: linear-gradient(135deg, #4a0020, #8b1a3a, #b82550);
    border-color: rgba(184, 37, 80, 0.4);
}

.flex-card.theme-mint {
    background: linear-gradient(135deg, #0a3a2a, #1a6b50, #2a9a72);
    border-color: rgba(42, 154, 114, 0.4);
}

.flex-card.theme-storm {
    background: linear-gradient(135deg, #1a1e2e, #2a3348, #3a4a62);
    border-color: rgba(80, 100, 130, 0.4);
}

.flex-card.theme-peach {
    background: linear-gradient(135deg, #8a4a2a, #c47040, #e89860);
    border-color: rgba(232, 152, 96, 0.4);
}

.flex-card.theme-cyberpunk {
    background: linear-gradient(135deg, #0a0028, #2a0050, #4a0070);
    border-color: rgba(0, 255, 200, 0.4);
}

.flex-card.theme-forest {
    background: linear-gradient(135deg, #0a2010, #1a4020, #2a5a30);
    border-color: rgba(60, 140, 70, 0.4);
}

.flex-card.theme-twilight {
    background: linear-gradient(135deg, #1a1040, #3a2060, #5a3080);
    border-color: rgba(120, 80, 170, 0.4);
}

.flex-card.theme-rosegold {
    background: linear-gradient(135deg, #6a3040, #a05060, #c87080);
    border-color: rgba(200, 112, 128, 0.4);
}

.flex-card.theme-obsidian {
    background: linear-gradient(135deg, #08080c, #12121a, #1c1c28);
    border-color: rgba(60, 60, 80, 0.5);
}

/* The sparkles wrapper — hidden for clean gradient look */
.sparkle-overlay {
    display: none;
}

.sparkle-overlay i {
    position: absolute;
    font-style: normal;
    color: white;
    opacity: 0.6;
    font-size: 14px;
}

/* Absolute positioning to match reference image stars */
.sparkle-overlay i:nth-child(1) {
    top: 12%;
    right: 12%;
    font-size: 12px;
}

.sparkle-overlay i:nth-child(2) {
    top: 48%;
    right: 10%;
    font-size: 14px;
}

.sparkle-overlay i:nth-child(3) {
    top: 52%;
    left: 8%;
    font-size: 14px;
}

.sparkle-overlay i:nth-child(4) {
    bottom: 18%;
    right: 14%;
    font-size: 12px;
}

/* Flex Card Content Wrappers */
.flex-card>* {
    z-index: 5;
    position: relative;
}

/* Top Section (Username and Badge) */
.card-top-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 16px 8px;
    /* Reduced from 20px padding */
}

.card-user-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Allows this flex child to shrink below its content size */
}

.card-display-name {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.05rem;
    /* Reduced from 1.15rem */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    word-break: break-all;
    /* Let long names without spaces wrap to the next line */
}

.card-user-sub {
    font-size: 0.70rem;
    font-weight: 600;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.tier-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 6px 12px;
    border-radius: 100px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    /* Prevents badge from getting squished by long names */
}

/* Reduced size for extremely long names */
.tier-chip.small-badge {
    padding: 4px 8px;
    font-size: 0.65rem;
    height: fit-content;
    margin-top: 4px;
}

/* Force colors on the icons instead if possible, but keep text white for clean look */
.tier-chip.rare {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.tier-chip.legendary {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.tier-chip.mythic {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

/* Avatar Section */
.avatar-center {
    flex: 1;
    position: relative;
    min-height: 250px;
}

.avatar-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
}

.avatar-img {
    position: absolute;
    bottom: -15px;
    /* Pull down slightly more to increase space */
    /* Center a 300px wide object perfectly using margin math */
    left: 50%;
    margin-left: -140px;
    /* Adjusting based on slightly smaller width */
    /* Sized to fit within card without overflowing */
    width: 280px;
    /* Reduced avatar size slightly */
    height: 280px;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4));
    z-index: 10;
}

/* Bottom Stats Panel */
.card-bottom-panel {
    background: rgba(0, 0, 0, 0.4);
    /* Dark glassy panel - works on all themes */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 10px 10px;
    /* Tighter margins */
    border-radius: 20px;
    padding: 10px 10px;
    /* Tighter internal padding */
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.mini-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 12px;
}

.ms-item {
    display: flex;
    flex-direction: column;
}

.ms-val {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.9rem;
    /* Reduced from 1.0rem */
    font-weight: 700;
    margin-bottom: 2px;
}

/* Color coding stats - bright colors on dark panel */
.ms-item:nth-child(1) .ms-val {
    color: #ffb84d;
}

/* Orange Value */
.ms-item:nth-child(2) .ms-val {
    color: #ff6ba0;
}

/* Pink Items */
.ms-item:nth-child(3) .ms-val {
    color: #a07aff;
}

/* Purple Friends */

.ms-lbl {
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mini-divider {
    height: 2px;
    background: rgba(0, 0, 0, 0.06);
    margin: 0 8px 12px;
    border-radius: 2px;
}

/* Rarest Items Row */
.top-items-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 8px;
    /* Tighter margin */
}

.ti-pill {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    /* Lighter semi-transparent for dark contrast */
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 6px 4px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ti-medal {
    font-size: 0.9rem;
}

.ti-name {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.5rem;
    /* Reduced from 0.55rem */
    font-weight: 600;
    color: #e2e8f0;
    /* Brighter name color to contrast with the dark panel */
    line-height: 1.1;
    word-break: break-word;
}

/* Mini Badges Row */
.mini-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.badge-pill {
    padding: 2px 6px;
    /* Reduced from 3px 8px */
    border-radius: 100px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.55rem;
    /* Reduced from 0.6rem */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    /* Reduced gap */
    background: rgba(40, 42, 54, 0.8);
    /* Dark base */
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Specific Badge Colors - Optimized for Dark Background */
.badge-og {
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.4);
    background: rgba(252, 165, 165, 0.15);
}

.badge-rich {
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.4);
    background: rgba(147, 197, 253, 0.15);
}

.badge-collector {
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.4);
    background: rgba(134, 239, 172, 0.15);
}

.badge-veteran {
    color: #fde047;
    border-color: rgba(253, 224, 71, 0.4);
    background: rgba(253, 224, 71, 0.15);
}

.card-wm {
    text-align: center;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 auto 10px;
    background: rgba(0, 0, 0, 0.15);
    /* Pill shape background */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 6px 30px;
    align-self: center;
    /* Flexbox horizontal centering */
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    width: 290px;
}

.btn-action {
    flex: 1;
    padding: 12px 0;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.25s;
    background: var(--bg-card);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

.btn-download {
    background: linear-gradient(135deg, var(--mint), var(--blue));
    color: white;
    border: none;
}

.btn-share {
    border-color: var(--pink);
    color: var(--pink);
}

.btn-share:hover {
    background: var(--pink);
    color: white;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 10px 20px;
    border-radius: 100px;
    border: 2px solid var(--border);
}

.share-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}

.social-icon {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.25s;
    display: grid;
    place-items: center;
}

.social-icon:hover {
    color: var(--purple);
    transform: scale(1.1);
}



/* Theme Picker */
.theme-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.theme-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 8px 40px var(--shadow);
}

.theme-card h3 {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 20px;
}

.theme-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.theme-divider-label {
    width: 100%;
    text-align: center;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 10px 0;
    padding-top: 10px;
    border-top: 2px dashed var(--border);
}

.theme-option {
    padding: 10px 16px;
    border-radius: 100px;
    border: 2px solid var(--border);
    background: #faf5ff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-option.selected {
    border-color: var(--pink);
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(192, 132, 252, 0.1));
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
}

.theme-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.theme-option.new-tag {
    position: relative;
}

/* Background Color Definitions for Dots */
.theme-dot.ocean {
    background: #0b457c;
}

.theme-dot.fire {
    background: #9c2b0a;
}

.theme-dot.bubblegum {
    background: #e87aab;
}

.theme-dot.pastel {
    background: #b8a0d2;
}

.theme-dot.neon {
    background: #1a0f35;
}

.theme-dot.galaxy {
    background: #1a1050;
}

.theme-dot.dark {
    background: #1a1b1d;
}

.theme-dot.sunset {
    background: linear-gradient(135deg, #c25535, #e88a30);
}

.theme-dot.gold {
    background: linear-gradient(135deg, #8a6914, #c9a020);
}

.theme-dot.stardust {
    background: linear-gradient(135deg, #2d1b69, #4a2c8a);
}

.theme-dot.heartbeat {
    background: linear-gradient(135deg, #a01040, #cc2060);
}

.theme-dot.crosshair {
    background: linear-gradient(135deg, #1a2332, #2a3a4c);
}

.theme-dot.dotwave {
    background: linear-gradient(135deg, #0d2137, #1a3a5c);
}

.theme-dot.trianglepeak {
    background: linear-gradient(135deg, #1a5a35, #2a7a4a);
}

.theme-dot.blossom {
    background: linear-gradient(135deg, #c46a8a, #e8a0b0);
}

.theme-dot.midnight {
    background: linear-gradient(135deg, #0c1030, #141e4a);
}

.theme-dot.coral {
    background: linear-gradient(135deg, #d06050, #e88070);
}

.theme-dot.arctic {
    background: linear-gradient(135deg, #3a7a9a, #5aaac0);
}

.theme-dot.ember {
    background: linear-gradient(135deg, #8a3500, #c05500);
}

.theme-dot.lavender {
    background: linear-gradient(135deg, #7b52a0, #a87cc8);
}

.theme-dot.cherry {
    background: linear-gradient(135deg, #8b1a3a, #b82550);
}

.theme-dot.mint {
    background: linear-gradient(135deg, #1a6b50, #2a9a72);
}

.theme-dot.storm {
    background: linear-gradient(135deg, #2a3348, #3a4a62);
}

.theme-dot.peach {
    background: linear-gradient(135deg, #c47040, #e89860);
}

.theme-dot.cyberpunk {
    background: linear-gradient(135deg, #2a0050, #00ffc8);
}

.theme-dot.forest {
    background: linear-gradient(135deg, #1a4020, #2a5a30);
}

.theme-dot.twilight {
    background: linear-gradient(135deg, #3a2060, #5a3080);
}

.theme-dot.rosegold {
    background: linear-gradient(135deg, #a05060, #c87080);
}

.theme-dot.obsidian {
    background: linear-gradient(135deg, #12121a, #2a2a38);
}

.theme-dot.tropics {
    background: #1a6b4a;
}

.theme-dot.diamond {
    background: #3a5a8c;
}

.theme-dot.cosmos {
    background: #1a0a40;
}

.theme-dot.reef {
    background: #0a4a5c;
}

.theme-dot.neonarcade {
    background: #2a0a4a;
}

.theme-dot.rainbow {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff);
}

.theme-dot.inferno {
    background: linear-gradient(135deg, #8b0000, #ff4500);
}

.theme-dot.dreamland {
    background: #ff9a9e;
}

.theme-dot.candy {
    background: #a18cd1;
}

.theme-dot.aqua {
    background: #4facfe;
}

/* Image Background Mappings based on styles */
.flex-card.theme-dreamland::before {
    background-image: url('../bg/1.jpeg');
    opacity: 0.8;
}

.flex-card.theme-candy::before {
    background-image: url('../bg/2.jpeg');
    opacity: 0.8;
}

.flex-card.theme-aqua::before {
    background-image: url('../bg/3.jpeg');
    opacity: 0.8;
}

.flex-card.theme-tropics::before {
    background-image: url('../bg/4.jpeg');
    opacity: 0.8;
}

.flex-card.theme-diamond::before {
    background-image: url('../bg/5.jpeg');
    opacity: 0.8;
}

.flex-card.theme-cosmos::before {
    background-image: url('../bg/6.jpeg');
    opacity: 0.8;
}

.flex-card.theme-reef::before {
    background-image: url('../bg/7.jpeg');
    opacity: 0.8;
}

.flex-card.theme-neonarcade::before {
    background-image: url('../bg/8.jpeg');
    opacity: 0.8;
}

.flex-card.theme-rainbow::before {
    background-image: url('../bg/9.jpeg');
    opacity: 0.8;
}

.flex-card.theme-inferno::before {
    background-image: url('../bg/10.jpeg');
    opacity: 0.8;
}

/* Dark transparent overlay behind top info for doodle/image background themes */
.flex-card.theme-dreamland .card-top-info,
.flex-card.theme-candy .card-top-info,
.flex-card.theme-aqua .card-top-info,
.flex-card.theme-tropics .card-top-info,
.flex-card.theme-diamond .card-top-info,
.flex-card.theme-cosmos .card-top-info,
.flex-card.theme-reef .card-top-info,
.flex-card.theme-neonarcade .card-top-info,
.flex-card.theme-rainbow .card-top-info,
.flex-card.theme-inferno .card-top-info {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 18px;
    margin: 4px 4px 0;
}

/* Other Sections that copy biogen.css directly */
.about-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.about-card {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 8px 40px var(--shadow);
}

.about-card h2 {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.about-card>p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 28px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.about-feature {
    background: #faf5ff;
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.about-feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow);
    border-color: var(--purple);
}

.about-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
}

.about-feature strong {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.92rem;
    display: block;
    margin-bottom: 6px;
}

.about-feature p {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
    margin: 0;
}

.faq-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px 50px;
}

.faq-title {
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.faq-item:hover {
    border-color: var(--purple);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 12px;
}

.faq-arrow {
    font-size: 0.7rem;
    color: var(--purple);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 22px;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 22px 20px;
}


@media(max-width: 640px) {
    .hero {
        padding: 36px 16px 20px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .flex-card {
        transform: none;
    }

    .card-section {
        padding: 0 10px 20px;
    }

    .action-buttons {
        width: 100%;
        max-width: 290px;
        flex-direction: column;
        gap: 8px;
    }

    .btn-action {
        width: 100%;
        padding: 14px 0;
        font-size: 0.9rem;
    }

    .social-share {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 14px;
        gap: 8px;
    }
}