/* Estilos para el juego de cupones */
.coupon-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.coupon-game-overlay.active {
    display: flex;
    opacity: 1;
}

.coupon-game-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    text-align: center;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(33, 112, 179, 0.3);
}

.coupon-game-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #2170b3, #f7941d, #2170b3);
    z-index: -1;
    filter: blur(20px);
    opacity: 0.4;
    animation: glow 4s infinite alternate;
}

@keyframes glow {
    0% {
        opacity: 0.4;
    }
    100% {
        opacity: 0.7;
    }
}

.coupon-game-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.coupon-game-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.coupon-game-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.coupon-game-subtitle {
    font-size: 16px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

/* Estilos para la ruleta */
.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 30px;
}

.wheel {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    transform: rotate(0deg);
    box-shadow: 0 0 20px rgba(33, 112, 179, 0.5);
}

.wheel-section {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wheel-center {
    position: absolute;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #2170b3, #1a5c9a);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-center::after {
    content: '';
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.wheel-arrow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    z-index: 10;
}

.wheel-arrow::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #f7941d;
    clip-path: polygon(50% 0, 0% 100%, 100% 100%);
}

.spin-button {
    background: linear-gradient(145deg, #f7941d, #e07d0b);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(247, 148, 29, 0.4);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(247, 148, 29, 0.6);
}

.spin-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(247, 148, 29, 0.4);
}

.spin-button:disabled {
    background: linear-gradient(145deg, #999, #777);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Estilos para el resultado */
.coupon-result {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

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

.coupon-code {
    font-size: 32px;
    font-weight: bold;
    color: #f7941d;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 2px dashed #f7941d;
    letter-spacing: 2px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.discount-amount {
    font-size: 48px;
    font-weight: bold;
    color: #2170b3;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.coupon-message {
    font-size: 18px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.whatsapp-claim {
    background: linear-gradient(145deg, #25D366, #128C7E);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-claim i {
    margin-right: 10px;
    font-size: 20px;
}

.whatsapp-claim:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-claim:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.4);
}

/* Partículas y efectos visuales */
.coupon-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.coupon-particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

/* Animación de celebración */
.celebration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    display: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .coupon-game-container {
        padding: 20px;
        width: 95%;
    }
    
    .wheel-container {
        width: 220px;
        height: 220px;
    }
    
    .coupon-game-title {
        font-size: 20px;
    }
    
    .coupon-code {
        font-size: 24px;
    }
    
    .discount-amount {
        font-size: 36px;
    }
}

/* Animación de aparición del popup */
@keyframes popupAppear {
    0% {
        transform: scale(0.7);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.coupon-game-container {
    animation: popupAppear 0.5s ease forwards;
}

/* Efecto de brillo en los botones */
.spin-button::after,
.whatsapp-claim::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.spin-button:hover::after,
.whatsapp-claim:hover::after {
    animation: shine 1.5s ease;
}

@keyframes shine {
    0% {
        opacity: 0;
        left: -50%;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        left: 150%;
    }
}
