* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.question-container {
    margin-bottom: 20px;
}

.intro {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

.intro p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.intro p:last-child {
    margin-bottom: 0;
}

.instruction {
    font-weight: 600;
    color: #667eea;
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 30px auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 8px solid #333;
}

.wheel:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.wheel.spinning {
    transition: transform 3s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.section {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
}

.section.red {
    background: #f44336;
    top: 0;
    left: 0;
    clip-path: polygon(100% 100%, 0 100%, 0 0);
}

.section.blue {
    background: #2196f3;
    top: 0;
    right: 0;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.section.green {
    background: #4caf50;
    bottom: 0;
    right: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.section.yellow {
    background: #ffeb3b;
    bottom: 0;
    left: 0;
    clip-path: polygon(100% 0, 0 0, 0 100%);
}

.center-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid #333;
    z-index: 10;
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #333;
    z-index: 20;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.result-display {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
    border: 2px solid #2196f3;
}

.result-display p {
    color: #1565c0;
    font-size: 1.2em;
    font-weight: bold;
}

.result-display.show-result {
    animation: pulse 0.5s ease;
}

.question {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-top: 25px;
    border-left: 5px solid #667eea;
}

.question p {
    color: #333;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.input-group input {
    flex: 1;
    padding: 15px;
    border: 3px solid #667eea;
    border-radius: 10px;
    font-size: 1.1em;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.input-group input.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.input-group input.incorrect {
    border-color: #f44336;
    animation: blink 0.5s ease;
}

.check-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.check-btn:active {
    transform: translateY(0);
}

.check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.try-again {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 2px solid #4caf50;
}

.feedback.revealed {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #17a2b8;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.reset-btn {
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

@keyframes blink {
    0%, 100% { border-color: #f44336; }
    50% { border-color: transparent; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Thumbs Up Animation */
.thumbs-up {
    position: fixed;
    font-size: 5em;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.thumbs-up.show {
    animation: thumbsUpAnimation 1s ease-out;
}

@keyframes thumbsUpAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5) rotate(20deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(40deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 1.5em;
    }

    .intro p,
    .question p {
        font-size: 1em;
    }

    .wheel-container {
        width: 250px;
        height: 250px;
    }

    .pointer {
        top: -15px;
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 30px solid #333;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group input,
    .check-btn {
        font-size: 1em;
    }

    .thumbs-up {
        font-size: 3em;
    }
}
