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

:root {
    --pink: #ff6b9d;
    --purple: #c084fc;
    --blue: #60a5fa;
    --mint: #34d399;
    --yellow: #fbbf24;
    --orange: #fb923c;
    --coral: #f87171;
    --bg: #fef7ff;
    --bg-card: #ffffff;
    --text: #3b1f5e;
    --text-light: #7c6a99;
    --border: #f0e4f7;
    --shadow: rgba(192, 132, 252, 0.12);
}

/* --- 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;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Base Styles (Matching BioBlox) */
.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 3px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);

}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    transition: all 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: linear-gradient(135deg, var(--pink), var(--purple));
    box-shadow: 0 4px 14px rgba(255, 107, 157, 0.25);
}

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

.hero h1 {
    font-family: 'Fredoka', 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: 'Fredoka', 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: 'Outfit', 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: 'Fredoka', 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: 'Fredoka', 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);
}

/* The sparkles wrapper */
.sparkle-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.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: 'Fredoka', 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: 'Fredoka', 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: 'Fredoka', 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: 'Fredoka', 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: 'Fredoka', 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: 'Outfit', 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: 'Fredoka', 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: 'Fredoka', 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: 'Fredoka', 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.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: 'Fredoka', 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;
}

.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: 'Fredoka', 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: 'Fredoka', 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: 'Fredoka', 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;
}

footer {
    margin-top: auto;
    padding: 24px 32px;
    border-top: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

footer a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--pink);
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

@media(max-width: 640px) {
    nav {
        padding: 12px 16px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
    }

    .mobile-menu span {
        width: 24px;
        height: 3px;
        background: var(--purple);
        border-radius: 3px;
    }

    .hero {
        padding: 36px 16px 20px;
    }

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

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

    footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .flex-card {
        transform: scale(0.85);
        /* Scale down on mobile */
        transform-origin: top center;
    }

    .card-outer {
        margin-bottom: -100px;
        /* Adjust spacing after scaling */
    }
}

@media(min-width: 641px) {
    .mobile-menu {
        display: none;
    }
}