:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --accent-color: #43D9AD;
    --background-color: #2F2E41;
    --surface-color: #3F3D56;
    --text-color: #FFFFFF;
    --text-secondary: #B0B0B0;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FFC107;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #2F2E41 0%, #1F1D36 100%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.main-container {
    width: 100%;
    max-width: 1000px;
    background-color: rgba(63, 61, 86, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 0 4px 10px rgba(108, 99, 255, 0.5);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 120px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-color);
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.wheel-container {
    position: relative;
    padding: 20px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
}

.pointer-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.pointer {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid var(--secondary-color);
}

.controls {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.action-button {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 15px 40px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.4);
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(108, 99, 255, 0.6);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.action-button.secondary {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    box-shadow: none;
}

.action-button.secondary:hover {
    background-color: rgba(67, 217, 173, 0.1);
    box-shadow: 0 0 15px rgba(67, 217, 173, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 14, 23, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: linear-gradient(135deg, var(--surface-color), #2F2E41);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(108, 99, 255, 0.5);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal h2 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.question-text {
    font-size: 1.4rem;
    color: var(--text-color);
    margin-bottom: 30px;
    font-weight: 600;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }

    #canvas {
        width: 300px;
        height: 300px;
    }

    .action-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
}