:root {
    --primary-pink: #ff0080;
    --primary-purple: #8000ff;
    --primary-cyan: #00ffff;
    --accent-yellow: #ffff00;
    --bg-dark: #0a0015;
    --bg-card: rgba(20, 10, 30, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #c0c0ff;
    --glow-pink: 0 0 20px rgba(255, 0, 128, 0.6), 0 0 40px rgba(255, 0, 128, 0.4);
    --glow-cyan: 0 0 20px rgba(0, 255, 255, 0.6), 0 0 40px rgba(0, 255, 255, 0.4);
    --glow-purple: 0 0 30px rgba(128, 0, 255, 0.8);
}

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

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-pink), transparent);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-cyan), transparent);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-purple), transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(100px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 100px) scale(0.9);
    }
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    display: none;
    width: 100%;
    animation: fadeIn 0.6s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Start Screen */
.title-section {
    text-align: center;
    margin-bottom: 60px;
}

.main-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1;
}

.glitch {
    position: relative;
    display: inline-block;
    font-family: 'Protest Revolution', sans-serif;
    color: var(--text-primary);
    text-shadow: var(--glow-pink);
    animation: glitch-text 3s ease-in-out infinite;
}

@keyframes glitch-text {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-3px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, 2px);
    }
    98% {
        transform: translate(2px, -1px);
    }
}

.subtitle {
    display: block;
    font-size: clamp(2rem, 6vw, 3.5rem);
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

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

.description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 20px;
    font-weight: 400;
}

.sparkles {
    font-size: 2rem;
    margin-top: 20px;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Buttons */
.start-btn,
.restart-btn {
    position: relative;
    display: block;
    margin: 0 auto;
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: var(--glow-pink);
}

.start-btn:hover,
.restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 128, 0.8), 0 0 60px rgba(255, 0, 128, 0.6);
}

.start-btn:active,
.restart-btn:active {
    transform: scale(0.98);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: btn-glow-slide 3s ease-in-out infinite;
}

@keyframes btn-glow-slide {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }
    100% {
        transform: translateX(100%) translateY(100%);
    }
}

.disclaimer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Quiz Screen */
.progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 40px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-pink));
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glow-cyan);
    width: 0%;
}

.progress-text {
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-cyan);
    text-shadow: var(--glow-cyan);
}

.question-container {
    perspective: 1000px;
}

.question-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: card-appear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes card-appear {
    from {
        opacity: 0;
        transform: rotateX(-15deg) translateY(50px);
    }
    to {
        opacity: 1;
        transform: rotateX(0) translateY(0);
    }
}

.question-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: var(--glow-cyan);
}

.question-text {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.options {
    display: grid;
    gap: 20px;
}

.option-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    transition: width 0.4s ease;
    z-index: 0;
}

.option-btn:hover::before {
    width: 100%;
}

.option-btn:hover {
    border-color: var(--primary-pink);
    box-shadow: var(--glow-pink);
    transform: translateX(10px);
}

.option-icon,
.option-text {
    position: relative;
    z-index: 1;
}

.option-icon {
    font-size: 1.5rem;
    font-weight: 900;
}

/* Result Screen */
.result-container {
    text-align: center;
}

.result-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-display {
    margin-bottom: 40px;
}

.score-circle {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto;
}

.score-ring {
    transform: rotate(-90deg);
    filter: drop-shadow(var(--glow-pink));
}

.score-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 12;
}

.score-ring-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 565.48;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    font-weight: 900;
    font-family: 'Protest Revolution', sans-serif;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-percent {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--text-secondary);
}

.result-message {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 700;
    margin: 30px 0;
    line-height: 1.5;
    color: var(--text-primary);
}

.result-details {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.source-link {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.source-link p {
    margin: 0;
}

.source-link a {
    color: var(--primary-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.source-link a:hover {
    color: var(--primary-pink);
    text-shadow: var(--glow-pink);
    border-bottom-color: var(--primary-pink);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .question-card {
        padding: 35px 25px;
    }

    .option-btn {
        padding: 20px 25px;
        font-size: 1rem;
    }

    .score-circle {
        width: 200px;
        height: 200px;
    }

    .score-number {
        font-size: 4rem;
    }

    .start-btn,
    .restart-btn {
        padding: 18px 50px;
        font-size: 1.3rem;
    }
}

/* SVG Gradient */
svg defs {
    display: none;
}
