/* =============================================
   DESIGN SYSTEM & VARIABLES
   ============================================= */
:root {
    --bg-dark: #06061a;
    --bg-card: rgba(15, 15, 40, 0.92);
    --accent-gold: #FFD700;
    --accent-amber: #FF8C00;
    --accent-orange: #FF6B00;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --accent-blue: #3B82F6;
    --accent-teal: #14B8A6;
    --text-primary: #f0f0f8;
    --text-secondary: #9898c0;
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    touch-action: manipulation;
}

body.overlay-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background: #100c06;
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    position: relative;
    background-image:
        linear-gradient(
            to bottom,
            rgba(12, 8, 3, 0.78) 0%,
            rgba(12, 8, 3, 0.60) 40%,
            rgba(12, 8, 3, 0.85) 100%
        ),
        url('bg-steppe.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* =============================================
   AMBIENT BACKGROUND GLOW
   ============================================= */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(120px);
    opacity: 0.25;
    z-index: 0;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #6B4A20, transparent 70%);
    top: -100px;
    left: -150px;
    animation: driftGlow1 20s ease-in-out infinite;
    opacity: 0.12;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7A3C20, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: driftGlow2 25s ease-in-out infinite;
    opacity: 0.10;
}

.glow-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #5C4A28, transparent 70%);
    top: 40%;
    right: 10%;
    animation: driftGlow3 22s ease-in-out infinite;
    opacity: 0.10;
}

@keyframes driftGlow1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 60px) scale(1.1); }
    66% { transform: translate(-40px, 40px) scale(0.9); }
}

@keyframes driftGlow2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -40px) scale(1.15); }
    66% { transform: translate(50px, -30px) scale(0.95); }
}

@keyframes driftGlow3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-70px, 50px) scale(1.1); }
}

/* =============================================
   ANIMATED PARTICLES
   ============================================= */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle linear infinite;
    opacity: 0;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(1);
    }
}

/* =============================================
   HEADER
   ============================================= */
.header {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 44px 20px 16px;
}

.header-content {
    display: inline-block;
    position: relative;
}

.title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 3.8rem);
    font-weight: 800;
    background: linear-gradient(
        135deg,
        #7a5a20 0%,
        #b08030 30%,
        #7a5a20 60%,
        #8a6828 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    filter: drop-shadow(0 2px 8px rgba(80, 50, 10, 0.4));
    line-height: 1.2;
}

.title-icon {
    -webkit-text-fill-color: initial;
    font-size: 0.65em;
    vertical-align: middle;
}

@keyframes shimmerTitle {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: clamp(0.85rem, 2.5vw, 1.15rem);
    color: var(--text-secondary);
    margin-top: 10px;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* =============================================
   MAIN SECTION
   ============================================= */
.main {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 40px;
}

/* =============================================
   WHEEL SECTION
   ============================================= */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.wheel-container {
    position: relative;
    width: clamp(280px, 80vw, 520px);
    height: clamp(280px, 80vw, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Outer decorative ring */
.wheel-outer-ring {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 3px solid rgba(255, 215, 0, 0.15);
    background: transparent;
    pointer-events: none;
}

.wheel-outer-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.12);
}

/* Outer glow */
.wheel-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(120, 80, 30, 0.10),
        rgba(100, 60, 20, 0.08),
        rgba(140, 98, 68, 0.10),
        rgba(160, 120, 50, 0.12),
        rgba(90, 70, 40, 0.08),
        rgba(120, 80, 30, 0.10)
    );
    filter: blur(35px);
    animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
    to { transform: rotate(360deg); }
}

/* LED Ring */
.led-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}

.led-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7A5C30;
    box-shadow: 0 0 3px rgba(160, 120, 60, 0.3);
    transition: all 0.15s ease;
}

.led-dot.active {
    background: #C8922A;
    box-shadow: 0 0 6px rgba(180, 130, 50, 0.6), 0 0 12px rgba(160, 110, 40, 0.3);
    transform: scale(1.2);
}

/* Canvas */
#wheelCanvas {
    border-radius: 50%;
    filter: sepia(0.45) brightness(0.82) contrast(1.05);
    width: 100%;
    height: 100%;
    transition: filter 0.3s;
}

.wheel-container:hover #wheelCanvas {
    filter: sepia(0.35) brightness(0.90) contrast(1.05);
}

/* Pointer */
.pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 56px;
    z-index: 12;
    filter: drop-shadow(0 6px 12px rgba(100, 60, 20, 0.5)) sepia(0.5);
    transition: transform 0.12s;
}

.pointer.bounce {
    animation: pointerBounce 0.12s ease;
}

@keyframes pointerBounce {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(10deg); }
}

/* Spin button */
.spin-btn {
    position: absolute;
    width: clamp(88px, 18vw, 110px);
    height: clamp(88px, 18vw, 110px);
    border-radius: 50%;
    border: none;
    background: radial-gradient(circle at 40% 35%, #2a1e0e 0%, #150e05 100%);
    color: #C8922A;
    font-family: var(--font-main);
    cursor: pointer;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 0 0 3px rgba(160, 110, 40, 0.5),
        0 0 20px rgba(120, 80, 30, 0.12),
        inset 0 0 20px rgba(100, 70, 25, 0.08);
    overflow: hidden;
}

.spin-btn-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    z-index: 2;
    position: relative;
}

.spin-btn-ring {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #C8922A;
    opacity: 0;
    animation: none;
}

.spin-btn.spinning .spin-btn-ring {
    opacity: 1;
    animation: spinRing 1s linear infinite;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

.spin-btn:hover {
    transform: scale(1.1);
    box-shadow:
        0 0 0 3px rgba(160, 110, 40, 0.7),
        0 0 25px rgba(120, 80, 30, 0.2),
        inset 0 0 20px rgba(100, 70, 25, 0.1);
}

.spin-btn:active {
    transform: scale(0.95);
}

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

.spin-icon {
    font-size: 1.6em;
    display: block;
}

.spin-text {
    display: block;
    font-size: clamp(0.6rem, 2vw, 0.72rem);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Hint */
.hint-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
    animation: pulseHint 2.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.hint-arrow {
    animation: bounceArrow 1.5s ease-in-out infinite;
    display: inline-block;
}

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

@keyframes pulseHint {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* =============================================
   HISTORY BAR
   ============================================= */
.history-bar {
    margin-top: 32px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 600px;
    width: 100%;
}

.history-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

.history-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.history-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.history-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    animation: chipIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    backdrop-filter: blur(8px);
}

@keyframes chipIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* =============================================
   RESULT OVERLAY & CARD
   ============================================= */
.result-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(3, 3, 15, 0.88);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-overlay.active {
    opacity: 1;
    visibility: visible;
}

.result-card {
    background: linear-gradient(
        160deg,
        rgba(18, 18, 48, 0.97) 0%,
        rgba(28, 12, 42, 0.97) 50%,
        rgba(15, 15, 40, 0.97) 100%
    );
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    box-shadow:
        var(--shadow-lg),
        var(--shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.result-overlay.active .result-card {
    transform: translateY(0);
    opacity: 1;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

.result-card::-webkit-scrollbar {
    width: 5px;
}

.result-card::-webkit-scrollbar-track {
    background: transparent;
}

.result-card::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.25);
    border-radius: 4px;
}

.close-btn {
    position: sticky;
    top: 0;
    float: right;
    margin-top: -8px;
    margin-right: -8px;
    margin-bottom: -38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.close-btn:active {
    transform: scale(0.9);
}

.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.result-emoji {
    font-size: 3.2rem;
    display: block;
    margin-bottom: 10px;
    animation: resultEmojiIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.2s;
}

@keyframes resultEmojiIn {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.result-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4.5vw, 2.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-amber), #fff3b0);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerTitle 4s ease-in-out infinite;
    line-height: 1.3;
}

.result-body {
    margin-top: 16px;
}

.result-period {
    display: inline-block;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-sm);
    padding: 7px 18px;
    font-size: 0.85rem;
    color: #c4b5fd;
    margin-bottom: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.result-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 20px;
}

.result-facts h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 14px;
}

.result-facts ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-facts li {
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    position: relative;
    padding-left: 36px;
    transition: all 0.25s;
    animation: factSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.result-facts li:nth-child(1) { animation-delay: 0.3s; }
.result-facts li:nth-child(2) { animation-delay: 0.4s; }
.result-facts li:nth-child(3) { animation-delay: 0.5s; }
.result-facts li:nth-child(4) { animation-delay: 0.6s; }

@keyframes factSlideIn {
    0% { transform: translateX(-20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.result-facts li:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 215, 0, 0.15);
}

.result-facts li::before {
    content: '✦';
    position: absolute;
    left: 14px;
    color: var(--accent-gold);
    font-size: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

.spin-again-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.spin-again-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.spin-again-btn:hover::before {
    left: 100%;
}

.spin-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 32px 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.5;
}

/* =============================================
   CONFETTI
   ============================================= */
.confetti-piece {
    position: fixed;
    z-index: 200;
    pointer-events: none;
    max-width: 20px;
    opacity: 0;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg) scale(0.2);
    }
}
/* =============================================
   QUIZ STYLES
   ============================================= */
.start-quiz-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15));
    color: #c4b5fd;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.start-quiz-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.3));
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
}

.quiz-container {
    margin-top: 8px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-progress {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.quiz-score-live {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 700;
}

.quiz-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-gold));
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.quiz-option {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}

.quiz-option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(4px);
}

.quiz-option:disabled {
    cursor: default;
}

.quiz-option.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.6);
    color: #6ee7b7;
    animation: correctPulse 0.5s ease;
}

.quiz-option.correct::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #10B981;
    font-weight: 700;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.quiz-option.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    animation: wrongShake 0.4s ease;
}

.quiz-option.wrong::after {
    content: '✗';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #EF4444;
    font-weight: 700;
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
}

.quiz-next-btn {
    display: block;
    width: 100%;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.quiz-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.quiz-back-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: 20px 0;
}

.quiz-result-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}

.quiz-result-circle svg {
    width: 100%;
    height: 100%;
}

.quiz-result-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
}

.quiz-result-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.quiz-result-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.quiz-result-verdict {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.quiz-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-retry-btn {
    padding: 13px 24px;
    border-radius: var(--radius-md);
    border: none;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: white;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
    body {
        min-height: 100vh;
        min-height: 100dvh;
        background-attachment: scroll;
        overflow-x: hidden;
    }

    .header {
        padding: 20px 16px 8px;
    }

    .ambient-glow {
        display: none;
    }

    .bg-particles {
        display: none;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 4px;
        margin-top: 6px;
    }

    .main {
        padding: 10px 12px 20px;
    }

    .wheel-section {
        gap: 16px;
    }

    .wheel-container {
        width: min(78vw, 360px);
        height: min(78vw, 360px);
    }

    .hint-text {
        font-size: 0.85rem;
    }

    .footer {
        padding: 16px 12px;
    }

    /* Result overlay */
    .result-overlay {
        padding: 8px;
        align-items: center;
        overflow: hidden;
    }

    .result-card {
        padding: 20px 14px;
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
    }

    .result-emoji {
        font-size: 2.4rem;
        margin-bottom: 6px;
    }

    .result-header {
        margin-bottom: 14px;
    }

    .result-title {
        font-size: 1.4rem;
    }

    .result-period {
        font-size: 0.8rem;
        padding: 5px 14px;
        margin-bottom: 12px;
    }

    .result-description {
        font-size: 0.88rem;
        line-height: 1.55;
        margin-bottom: 14px;
    }

    .result-facts h3 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .result-facts li {
        padding: 10px 12px 10px 30px;
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .result-facts li::before {
        left: 10px;
    }

    .start-quiz-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
        margin-top: 16px;
    }

    .spin-again-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
        margin-top: 14px;
    }

    .quiz-question {
        font-size: 1rem;
    }

    .quiz-option {
        padding: 12px 14px;
        font-size: 0.88rem;
    }

    .led-dot {
        width: 6px;
        height: 6px;
    }

    .spin-btn {
        width: clamp(68px, 20vw, 86px);
        height: clamp(68px, 20vw, 86px);
    }

    .close-btn {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 380px) {
    .header {
        padding: 14px 12px 6px;
    }

    .title {
        font-size: 1.5rem;
    }

    .wheel-container {
        width: min(88vw, 300px);
        height: min(88vw, 300px);
    }

    .result-card {
        padding: 20px 14px;
    }
}
