/**
 * Styles de la Roue de la Fortune
 * Spinomax
 */

/* ========================================
   PAGE ROUE
   ======================================== */

.wheel-header {
    text-align: center;
    margin-bottom: 40px;
}

.wheel-title {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.wheel-description {
    font-size: 1.1em;
    color: #666;
    max-width: 600px;
    margin: 0 auto 20px;
}

/* ========================================
   CHAMP CODE (MODE PRIVÉ)
   ======================================== */

.token-input-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 12px;
    border: 2px solid var(--primary-color);
}

.token-input-container label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.3em;
    color: var(--dark-color);
}

.token-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 900;
    color: #ff6b35;
    transition: var(--transition);
}

.token-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.token-input[readonly] {
    background: #f0f0f0;
    cursor: not-allowed;
}

.btn-validate-token {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-validate-token:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* ========================================
   ZONE DE JEU
   ======================================== */

.wheel-game-area {
    background: var(--white);
    border-radius: 20px;
    padding: clamp(15px, 3vw, 40px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    position: relative;
    /*max-width: var(--content-max-width);*/
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Bouton plein écran */
.btn-fullscreen {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-fullscreen:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* État plein écran */
.wheel-game-area:fullscreen {
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wheel-game-area:-webkit-full-screen {
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wheel-game-area:-moz-full-screen {
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Message d'erreur */
.wheel-error {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.error-text {
    font-size: 1.2em;
    color: var(--danger-color);
    font-weight: 500;
}

/* ========================================
   CANVAS DE LA ROUE
   ======================================== */

.wheel-canvas-wrapper {
    position: relative;
    width: min(100%, 900px);
    margin: 0 auto;
    aspect-ratio: 1;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    display: block;
}


.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25%;
    height: 25%;
    max-width: 175px;
    max-height: 175px;
    min-width: 70px;
    min-height: 70px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 6px solid var(--white);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spin-button:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.spin-button:active:not(:disabled) {
    transform: translate(-50%, -50%) scale(0.98);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #999;
}

#wheelCanvas, #cooldownCanvas {display: block; margin: 0 auto;}
/* Le cooldown recouvre la roue */
#cooldownCanvas {position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; /* on ne bloque pas les clics inutilement */}

.spin-text {
    color: var(--white);
    font-size: clamp(18px, 3vw, 25px);
    font-weight: bold;
    text-transform: uppercase;
    font-family: "Boogaloo", sans-serif;

}

/* ========================================
   MODAL RÉSULTAT
   ======================================== */

.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.result-content {
    background: var(--white);
    border-radius: 20px;
    padding: 60px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideUp 0.5s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.result-icon {
    margin-bottom: 20px;
    animation: bounce 0.6s ease infinite alternate;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result-icon img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.result-title {
    font-size: 2em;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.result-prize {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.result-description {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.result-close {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.result-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}


/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .wheel-title {
        font-size: 2em;
    }
    
    .wheel-game-area {
        padding: 20px;
    }
    
    .wheel-canvas-wrapper {
        width: 100%;
    }
    
    .result-content {
        padding: 40px 20px;
    }
    
    .result-icon {
        font-size: 4em;
    }
    
    .result-title {
        font-size: 1.5em;
    }
    
    .result-prize {
        font-size: 1.4em;
    }
    
    .prizes-grid {
        grid-template-columns: 1fr;
    }
    
    .token-input-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    /*.wheel-pointer {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 20px solid var(--danger-color);
    }*/
    
    .btn-fullscreen {
        width: 35px;
        height: 35px;
        font-size: 1.2em;
    }
}
