﻿:root {
    /* Theme default (Clean) values */
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --accent-color: #64748b;
    --btn-primary: #0f172a;
    --btn-primary-text: #ffffff;
    --btn-secondary: #f1f5f9;
    --btn-secondary-text: #334155;
    --input-border: #cbd5e1;
    --accent-glow: transparent;
    --title-color: #0f172a;
}

/* 10 THEMES MAPPED TO BODY SELECTORS */
body[data-theme="clean"] {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --accent-color: #64748b;
    --btn-primary: #0f172a;
    --btn-primary-text: #ffffff;
    --btn-secondary: #f1f5f9;
    --btn-secondary-text: #334155;
    --input-border: #cbd5e1;
    --accent-glow: transparent;
    --title-color: #0f172a;
}

body[data-theme="neon"] {
    --bg-color: #0b0f19;
    --card-bg: #161c2e;
    --text-color: #f1f5f9;
    --accent-color: #22d3ee;
    --btn-primary: #06b6d4;
    --btn-primary-text: #000000;
    --btn-secondary: #1e293b;
    --btn-secondary-text: #94a3b8;
    --input-border: #06b6d466;
    --accent-glow: 0 0 15px rgba(6, 182, 212, 0.4);
    --title-color: #22d3ee;
}

body[data-theme="black"] {
    --bg-color: #121212;
    --card-bg: #1c1c1e;
    --text-color: #e2e8f0;
    --accent-color: #fbbf24;
    --btn-primary: #fbbf24;
    --btn-primary-text: #09090b;
    --btn-secondary: #27272a;
    --btn-secondary-text: #e2e8f0;
    --input-border: #fbbf2433;
    --accent-glow: 0 0 10px rgba(251, 191, 36, 0.2);
    --title-color: #fbbf24;
}

body[data-theme="gourmet"] {
    --bg-color: #faf6ee;
    --card-bg: #ffffff;
    --text-color: #451a03;
    --accent-color: #92400e;
    --btn-primary: #b91c1c;
    --btn-primary-text: #ffffff;
    --btn-secondary: #fef3c7;
    --btn-secondary-text: #78350f;
    --input-border: #f59e0b33;
    --accent-glow: transparent;
    --title-color: #991b1b;
}

body[data-theme="arcade"] {
    --bg-color: #140526;
    --card-bg: #220b44;
    --text-color: #fae8ff;
    --accent-color: #22d3ee;
    --btn-primary: #d946ef;
    --btn-primary-text: #ffffff;
    --btn-secondary: #581c87;
    --btn-secondary-text: #22d3ee;
    --input-border: #d946ef88;
    --accent-glow: 4px 4px 0px #00f5ff;
    --title-color: #f472b6;
}

body[data-theme="casino"] {
    --bg-color: #0b3c23;
    --card-bg: #145334;
    --text-color: #fef08a;
    --accent-color: #facc15;
    --btn-primary: #dc2626;
    --btn-primary-text: #ffffff;
    --btn-secondary: #062c18;
    --btn-secondary-text: #facc15;
    --input-border: #eab30866;
    --accent-glow: 0 0 10px rgba(234, 179, 8, 0.3);
    --title-color: #facc15;
}

body[data-theme="coffee"] {
    --bg-color: #f5ebe0;
    --card-bg: #ffffff;
    --text-color: #4f3c30;
    --accent-color: #9a7b56;
    --btn-primary: #4b382a;
    --btn-primary-text: #f5ebe0;
    --btn-secondary: #e3d5ca;
    --btn-secondary-text: #4f3c30;
    --input-border: #d5c2b1;
    --accent-glow: transparent;
    --title-color: #4b382a;
}

body[data-theme="summer"] {
    --bg-color: #e0f2fe;
    --card-bg: #ffffff;
    --text-color: #0c4a6e;
    --accent-color: #f97316;
    --btn-primary: #f97316;
    --btn-primary-text: #ffffff;
    --btn-secondary: #bae6fd;
    --btn-secondary-text: #0369a1;
    --input-border: #bae6fd;
    --accent-glow: transparent;
    --title-color: #0369a1;
}

body[data-theme="cyber"] {
    --bg-color: #ecefef;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --accent-color: #00c880;
    --btn-primary: #0f172a;
    --btn-primary-text: #ffffff;
    --btn-secondary: #f1f5f9;
    --btn-secondary-text: #334155;
    --input-border: #00ffa688;
    --accent-glow: inset 4px 0 0 #00ffa6;
    --title-color: #0f172a;
}

body[data-theme="party"] {
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --accent-color: #db2777;
    --btn-primary: linear-gradient(135deg, #ec4899, #ef4444, #eab308);
    --btn-primary-text: #ffffff;
    --btn-secondary: #f1f5f9;
    --btn-secondary-text: #1e293b;
    --input-border: #fbcfe8;
    --accent-glow: 0 0 10px rgba(219, 39, 119, 0.2);
    --title-color: #db2777;
}

body[data-theme="sunset"] {
    --bg-color: #fef2f2;
    --card-bg: #ffffff;
    --text-color: #7c2d12;
    --accent-color: #d97706;
    --btn-primary: linear-gradient(135deg, #f97316, #ef4444);
    --btn-primary-text: #ffffff;
    --btn-secondary: #fff7ed;
    --btn-secondary-text: #9a3412;
    --input-border: #fed7aa;
    --accent-glow: 0 0 15px rgba(249, 115, 22, 0.25);
    --title-color: #ea580c;
}

body[data-theme="ocean"] {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #dbeafe;
    --accent-color: #22d3ee;
    --btn-primary: #2563eb;
    --btn-primary-text: #ffffff;
    --btn-secondary: #1e293b;
    --btn-secondary-text: #bfdbfe;
    --input-border: #1e3a8a;
    --accent-glow: 0 0 15px rgba(37, 99, 235, 0.4);
    --title-color: #38bdf8;
}

body[data-theme="forest"] {
    --bg-color: #f0fdf4;
    --card-bg: #ffffff;
    --text-color: #052e16;
    --accent-color: #047857;
    --btn-primary: #047857;
    --btn-primary-text: #ffffff;
    --btn-secondary: #ecfdf5;
    --btn-secondary-text: #065f46;
    --input-border: #a7f3d0;
    --accent-glow: transparent;
    --title-color: #064e3b;
}

body[data-theme="vintage"] {
    --bg-color: #fdf6e2;
    --card-bg: #faf0d7;
    --text-color: #2c1a1d;
    --accent-color: #8b2635;
    --btn-primary: #8b2635;
    --btn-primary-text: #ffffff;
    --btn-secondary: #ffffff;
    --btn-secondary-text: #8b2635;
    --input-border: #8b263566;
    --accent-glow: 0 0 10px rgba(139, 38, 53, 0.15);
    --title-color: #8b2635;
}

body[data-theme="galaxy"] {
    --bg-color: #03001e;
    --card-bg: #120024;
    --text-color: #f3e8ff;
    --accent-color: #d946ef;
    --btn-primary: linear-gradient(135deg, #7c3aed, #db2777, #e879f9);
    --btn-primary-text: #ffffff;
    --btn-secondary: #2e1065;
    --btn-secondary-text: #e9d5ff;
    --input-border: #6b21a8;
    --accent-glow: 0 0 20px rgba(168, 85, 247, 0.3);
    --title-color: #f472b6;
}

body[data-theme="gold"] {
    --bg-color: #0e0d0a;
    --card-bg: #181612;
    --text-color: #f3efe0;
    --accent-color: #d4af37;
    --btn-primary: linear-gradient(180deg, #f5d77f, #b89742);
    --btn-primary-text: #000000;
    --btn-secondary: #1e1b15;
    --btn-secondary-text: #d4af37;
    --input-border: #d4af3766;
    --accent-glow: 0 0 20px rgba(212, 175, 55, 0.2);
    --title-color: #d4af37;
}

body[data-theme="candy"] {
    --bg-color: #fff1f2;
    --card-bg: #ffffff;
    --text-color: #831843;
    --accent-color: #db2777;
    --btn-primary: #f472b6;
    --btn-primary-text: #ffffff;
    --btn-secondary: #fff1f2;
    --btn-secondary-text: #be185d;
    --input-border: #fbcfe8;
    --accent-glow: 0 0 10px rgba(244, 114, 182, 0.2);
    --title-color: #db2777;
}

body[data-theme="sakura"] {
    --bg-color: #fff5f5;
    --card-bg: #ffffff;
    --text-color: #5c061d;
    --accent-color: #e11d48;
    --btn-primary: #f43f5e;
    --btn-primary-text: #ffffff;
    --btn-secondary: #fff5f5;
    --btn-secondary-text: #be123c;
    --input-border: #fecdd3;
    --accent-glow: transparent;
    --title-color: #9f1239;
}

body[data-theme="emerald"] {
    --bg-color: #022c22;
    --card-bg: #064e3b;
    --text-color: #ecfdf5;
    --accent-color: #34d399;
    --btn-primary: #10b981;
    --btn-primary-text: #022c22;
    --btn-secondary: #022c22;
    --btn-secondary-text: #a7f3d0;
    --input-border: #047857;
    --accent-glow: 0 0 15px rgba(16, 185, 129, 0.2);
    --title-color: #34d399;
}

body[data-theme="lavender"] {
    --bg-color: #f5f3ff;
    --card-bg: #ffffff;
    --text-color: #2e1065;
    --accent-color: #7c3aed;
    --btn-primary: #7c3aed;
    --btn-primary-text: #ffffff;
    --btn-secondary: #f5f3ff;
    --btn-secondary-text: #6d28d9;
    --input-border: #ddd6fe;
    --accent-glow: 0 0 12px rgba(124, 58, 237, 0.15);
    --title-color: #6d28d9;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}



/* Adapt bootstrap text-muted to dynamic themes */
.text-muted {
    color: var(--text-color) !important;
    opacity: 0.7;
}

h1, h2, h3, h4, h5 {
    font-family: 'Space Grotesk', sans-serif;
}

.themed-card {
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 1.25rem;
    transition: all 0.4s ease;
    box-shadow: var(--accent-glow);
}

.themed-input {
    background-color: transparent !important;
    color: var(--text-color) !important;
    border: 1.5px solid var(--input-border) !important;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease;
}

    .themed-input:focus {
        border-color: var(--accent-color) !important;
        box-shadow: none !important;
    }

    .themed-input::placeholder {
        color: var(--text-color) !important;
        opacity: 0.5 !important;
    }

.themed-btn-primary {
    background: var(--btn-primary);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .themed-btn-primary:hover {
        opacity: 0.9;
        transform: translateY(-2px);
    }

    .themed-btn-primary:active {
        transform: translateY(0);
    }

.themed-btn-secondary {
    background: var(--btn-secondary);
    color: var(--btn-secondary-text);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .themed-btn-secondary:hover {
        opacity: 0.9;
    }

/* WHEEL WRAPPER & DESIGNS */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid var(--accent-color);
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

#wheelCanvas {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 8px solid var(--card-bg);
    background-color: var(--card-bg);
    transition: border-color 0.4s ease, background-color 0.4s ease;
}

.spin-center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 4px solid var(--accent-color);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s ease;
    user-select: none;
}

    .spin-center-btn:hover {
        transform: translate(-50%, -50%) scale(1.08);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }

    .spin-center-btn:active {
        transform: translate(-50%, -50%) scale(0.95);
    }

/* BADGES & EXTRA UI */
.prize-badge {
    display: inline-flex;
    align-items: center;
    background: var(--btn-secondary);
    color: var(--btn-secondary-text);
    padding: 0.4rem 0.8rem;
    border-radius: 50rem;
    margin: 0.25rem;
    font-weight: 500;
}

.prize-remove {
    margin-left: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.7;
}

    .prize-remove:hover {
        opacity: 1;
        color: #ef4444;
    }

footer {
    margin-top: auto;
    padding: 1.5rem 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.hover-underline:hover {
    text-decoration: underline !important;
}

@keyframes blinkLight {
    0%, 100% {
        opacity: 1;
        filter: brightness(1.2);
    }

    50% {
        opacity: 0.4;
        filter: brightness(0.8);
    }
}
