/* Estilos generales y variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

:root {
    --wheel-size: 600px;
    --wheel-font-size: 18px;
    --wheel-center-size: 120px;
    --indicator-size: 40px;
    --sector-text-width: 140px;
    --top-margin: 40px;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: url(../images/Recurso\ 34.png);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
    will-change: transform;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
}

/* Nuevo contenedor principal que contiene tanto los destellos como la ruleta */
.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    max-width: min(var(--wheel-size), 100vw);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    box-sizing: border-box;
    z-index: 5;
    overflow: hidden;
}

/* Contenedor para la imagen superior */
.top-image-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--top-margin);
    z-index: 0;
}

/* Estilos para la imagen de fondo */
.background-image {
    position: absolute;
    width: 100%;
    max-width: min(150%, 100vw);
    height: auto;
    z-index: 1;
    top: -17%;
    left: 50%;
    transform: translate(-50%, -50%);
    will-change: transform; /* Optimiza la transformación */
    backface-visibility: hidden; /* Reduce parpadeos */
    -webkit-backface-visibility: hidden;
}

/* Estilos para la imagen superior (texto) */
.top-image {
    position: relative;
    max-width: 90%; /* Aumentado de 80% */
    height: auto;
    z-index: 2;
    will-change: transform; /* Optimiza la transformación */
    backface-visibility: hidden; /* Reduce parpadeos */
    -webkit-backface-visibility: hidden;
}

.container {
    position: relative;
    width: min(var(--wheel-size), 100%);
    aspect-ratio: 1/1;
    margin: 0 auto;
    background-color: transparent;
}

/* Capa de destellos - Ocupando toda la pantalla */
.sparkles-layer {
    position: fixed; /* Cambiado a fixed para ocupar toda la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Alto total del viewport */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0; /* Por debajo de todo el contenido */
    overflow: hidden; /* Evita que se desborde */
}

/* Estilos para la imagen de destellos de fondo */
.sparkles-background {
    position: absolute;
    min-width: 100vw; /* Asegura que cubra todo el ancho */
    min-height: 100vh; /* Asegura que cubra todo el alto */
    object-fit: cover; /* La imagen cubrirá todo el espacio */
    opacity: 0.4;
    pointer-events: none; /* Permite hacer clic a través de la imagen */
    /* animation: pulse 3s infinite ease-in-out; */ /* Animación de pulso para destacar */
    transform: translateZ(0); /* Fuerza aceleración por hardware */
    -webkit-transform: translateZ(0);
    will-change: opacity; /* Optimiza cambios de opacidad */
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Estilo para la ruleta */
.wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 5;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: transform 5s cubic-bezier(0.18, 0.89, 0.32, 0.97);
    transform: rotate(0deg) translateZ(0); /* Fuerza aceleración por hardware */
    display: block;
    aspect-ratio: 1/1;
    will-change: transform; /* Optimiza la transformación */
    -webkit-transform: rotate(0deg) translateZ(0);
    backface-visibility: hidden; /* Reduce parpadeos */
    -webkit-backface-visibility: hidden;
}

/* Estilo para los sectores triangulares */
.sector-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 50% 50%);
    transform-origin: center;
    overflow: hidden;
    background-size: 150px 150px;
    background-position: right 50px top 30px;
    background-repeat: no-repeat;
    background-size: 100px 100px;
    background-position: 75% 25%;
    overflow: hidden;
    will-change: transform; /* Optimiza la transformación */
    backface-visibility: hidden; /* Reduce parpadeos */
    -webkit-backface-visibility: hidden;
}

/* Definir los colores alternos para los sectores */
.sector-container:nth-child(odd) {
    background-color: #1a4570; /* Azul oscuro */
}

.sector-container:nth-child(even) {
    background-color: white; /* Blanco */
}

/* Efecto de iluminación para el sector ganador */
.sector-container.winner {
    z-index: 5; /* Asegurar que esté por encima de otros sectores */
    filter: brightness(1.2) contrast(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 215, 0, 0.5);
    transform-origin: 50% 50%; /* Asegurar que la escala se aplica desde el centro */
}

/* Efecto especial para la imagen dentro del sector ganador */
.sector-container.winner .sector-image {
    animation: pulse-scale 1.5s ease-in-out infinite;
    transform-origin: center center;
}

@keyframes pulse-scale {
    0% {transform: scale(1) rotate(21deg);}
    50% {transform: scale(1.15) rotate(21deg);}
    100% {transform: scale(1) rotate(21deg);}
}

@keyframes highlight {
    0% { 
        filter: brightness(1.2); 
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    }
    50% { 
        filter: brightness(1.6); 
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.9), 0 0 40px rgba(255, 215, 0, 0.5);
    }
    100% { 
        filter: brightness(1.2); 
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
    }
}

/* Estilo para el contenido de los sectores */
.sector-content {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    padding-top: 50px;
}

/* Rotación de cada sector */
.sector-container:nth-child(1) { transform: rotate(0deg); }
.sector-container:nth-child(2) { transform: rotate(45deg); }
.sector-container:nth-child(3) { transform: rotate(90deg); }
.sector-container:nth-child(4) { transform: rotate(135deg); }
.sector-container:nth-child(5) { transform: rotate(180deg); }
.sector-container:nth-child(6) { transform: rotate(225deg); }
.sector-container:nth-child(7) { transform: rotate(270deg); }
.sector-container:nth-child(8) { transform: rotate(315deg); }

/* Estilo para la imagen dentro del sector - DESKTOP por defecto */
.sector-image {
    position: absolute;
    width: 46%;
    height: 46%;
    top: 8px;
    left: 38%;
    transform: rotate(20deg); /* 👉 aquí cambias a 0, 90, 180, 270... */
    transform-origin: center center;
}

/* Estilos específicos para TABLET */
@media (max-width: 1200px) {
    .sector-image {
        top: 11px;
        transform: rotate(21deg);
    }
}

/* Estilo para el texto dentro del sector */
.sector-text {
    position: absolute;
    width: var(--sector-text-width);
    text-align: center;
    transform-origin: bottom center;
    top: 80px;
    left: 50%;
    margin-left: calc(var(--sector-text-width) / -2);
    color: white;
    font-weight: bold;
    font-size: var(--wheel-font-size);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    z-index: 5;
    /* Rotar los textos para que se alineen correctamente con los sectores */
    transform: rotate(-22.5deg);
    pointer-events: none;
    line-height: 1.3;
}

/* Ajustes específicos para cada sector */
.sector-container:nth-child(1) .sector-text { transform: rotate(-22.5deg); }
.sector-container:nth-child(2) .sector-text { transform: rotate(22.5deg); }
.sector-container:nth-child(3) .sector-text { transform: rotate(67.5deg); }
.sector-container:nth-child(4) .sector-text { transform: rotate(112.5deg); }
.sector-container:nth-child(5) .sector-text { transform: rotate(157.5deg); }
.sector-container:nth-child(6) .sector-text { transform: rotate(202.5deg); }
.sector-container:nth-child(7) .sector-text { transform: rotate(247.5deg); }
.sector-container:nth-child(8) .sector-text { transform: rotate(292.5deg); }

.sector-container:nth-child(even) .sector-text {
    color: #1a4570; /* Color oscuro para sectores claros */
}

/* Estilo para el centro de la ruleta */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--wheel-center-size);
    height: var(--wheel-center-size);
    background-color: #1a4570;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    font-weight: bold;
    font-size: 26px; /* Tamaño base para móviles */
    line-height: 1.2;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    cursor: pointer; /* Cambia el cursor para indicar que es clickeable */
    transition: all 0.3s ease; /* Transición suave para efectos hover */
}

/* Efecto hover para el centro de la ruleta */
.wheel-center:hover {
    background-color: #2c5c8e;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Efecto al hacer click */
.wheel-center:active {
    transform: translate(-50%, -50%) scale(0.95);
}

/* Estilo para el botón de girar */
.spin-button {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background: #1a4570;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.spin-button:hover {
    background: #2c5c8e;
    transform: translateX(-50%) scale(1.05);
}

/* Estilo para el indicador del sector ganador */
.indicator {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: var(--indicator-size) solid #d32f2f;
    z-index: 20;
}

/* Estilo para el mensaje de resultado */
.result-message {
    position: absolute;
    bottom: -120px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: white;
    padding: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.result-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==== MEDIA QUERIES PARA RESPONSIVE ==== */

/* Tablets grandes (como 2733 x 2049) */
@media (min-width: 1200px) and (max-width: 2800px) and (min-height: 1800px) {
    :root {
        --wheel-size: 1800px; /* Extremadamente grande para tablets de alta resolución */
        --wheel-font-size: 36px;
        --wheel-center-size: 250px;
        --sector-image-size: 200px;
        --top-margin: 170px; /* Más espacio para la imagen superior */
    }
    
    /* Texto del centro de la ruleta más grande */
    .wheel-center {
        font-size: 45px;
        line-height: 1.1;
    }
    
    /* Ajuste de la posición de las imágenes de los sectores */
    .sector-image {
        top: 11px;
        transform: rotate(21deg);
    }
    
    /* Popup más grande para tablets grandes */
    .premio-popup-content {
        max-width: 1100px;
        padding: 60px;
        width: 96%;
        border-radius: 25px;
    }
    
    .premio-popup-body img {
        max-width: 35%;
        margin-bottom: 40px;
        margin-top: 25px;
    }
    
    .premio-popup-header h2 {
        font-size: 48px;
    }
    
    .premio-popup-header h3 {
        font-size: 38px;
    }
    
    .premio-popup-body h3 {
        font-size: 42px;
    }
    
    .premio-popup-button {
        padding: 20px 45px;
        font-size: 28px;
    }
    
    .sector-image {
        top: 26px;
        width: 48%;
        transform: rotate(23deg);
    }
    
    .main-container {
        padding: 2rem;
    }
    
    .top-image {
        max-width: 95%; /* Imagen superior más grande en tablets */
    }
    
    .background-image {
        max-width: 160%; /* Fondo más grande */
    }
}

/* Tablets y iPads (horizontal) */
@media (max-width: 1199px) {
    :root {
        --wheel-size: 505px;
        --wheel-font-size: 20px;
        --wheel-center-size: 80px;
        --sector-image-size: 100px;
        --top-margin: 95px;
    }
    
    /* Texto del centro de la ruleta */
    .wheel-center {
        font-size: 15px;
        line-height: 1.1;
    }
    
    .top-image {
        max-width: 85%;
    }
    
    .background-image {
        max-width: 140%;
    }
    
    .top-image-container {
        margin-bottom: var(--top-margin);
    }
    
    .sector-text {
        font-size: var(--wheel-font-size);
        top: 45px;
        width: 100px;
        margin-left: -50px;
    }
    
    .wheel-center {
        width: var(--wheel-center-size);
        height: var(--wheel-center-size);
    }
    
    .sector-image {
        top: 8px;
        width: 45%;
    }
    
    .indicator {
        border-top: 25px solid #d32f2f;
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
    }

    .main-container {
        height: 90vh;
        padding: 1rem;
    }

    .container {
        transform: scale(0.95);
        margin: 0 auto;
    }
}

/* Tablets y iPads (vertical) */
@media (min-width: 600px) and (max-width: 992px) and (orientation: portrait) {
    :root {
        --wheel-size: 650px;
        --wheel-font-size: 18px;
        --wheel-center-size: 110px;
        --sector-image-size: 90px;
        --top-margin: 60px;
    }
    
    /* Ajuste de la posición de las imágenes de los sectores */
    .sector-image {
        top: 12px;
        transform: rotate(21deg);
    }
    
    /* Texto del centro de la ruleta */
    .wheel-center {
        font-size: 28px;
        line-height: 1.1;
    }
    
    .top-image {
        max-width: 85%;
    }
    
    .background-image {
        max-width: 140%;
        top: -15%;
    }
    
    .sector-text {
        top: 40px;
        width: 90px;
        margin-left: -45px;
    }
    
    .spin-button {
        bottom: -50px;
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .result-message {
        bottom: -80px;
        font-size: 18px;
    }
    
    .indicator {
        border-top: 25px solid #d32f2f;
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
    }

    .main-container {
        height: 90vh;
        padding: 1rem;
    }

    .container {
        transform: scale(0.9);
        margin: 0 auto;
    }
}

/* Tablets pequeñas y dispositivos intermedios */
@media (min-width: 481px) and (max-width: 599px) {
    :root {
        --wheel-size: 550px; /* Ruleta más grande */
        --wheel-font-size: 16px;
        --wheel-center-size: 100px;
        --sector-image-size: 85px;
        --top-margin: 70px; /* Más espacio para la imagen superior */
    }
    
    /* Ajuste de la posición de las imágenes de los sectores */
    .sector-image {
        top: 15px;
        transform: rotate(21deg);
    }
    
    /* Texto del centro de la ruleta */
    .wheel-center {
        font-size: 34px;
        line-height: 1.1;
    }
    
    .sector-image {
        top: 7px;
    }
    
    .top-image {
        max-width: 92%; /* Imagen superior más grande */
    }
    
    .background-image {
        max-width: 150%; /* Fondo más grande */
    }
}

/* Móviles grandes */
@media (max-width: 480px) {
    :root {
        --wheel-size: 380px; /* Ruleta más grande incluso en móviles */
        --wheel-font-size: 13px;
        --wheel-center-size: 80px;
        --sector-image-size: 55px;
        --top-margin: 20px;
    }
    
    .main-container {
        height: 100vh;
        padding: 0.5rem;
        justify-content: center;
    }

    .top-image-container {
        margin-bottom: 10px;
    }

    .container {
        transform: scale(0.9);
        margin: -20px auto;
    }

    .spin-button {
        bottom: -35px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .result-message {
        bottom: -55px;
        font-size: 14px;
    }

    .premio-popup-content {
        padding: 15px;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Móviles pequeños */
@media (max-width: 320px) {
    :root {
        --wheel-size: 320px; /* Aún más grande incluso en móviles pequeños */
        --wheel-font-size: 12px;
        --wheel-center-size: 65px;
        --sector-image-size: 45px;
    }
    
    .sector-text {
        top: 25px;
    }
    
    .wheel-center {
        font-size: 12px;
    }
    
    .spin-button {
        bottom: -40px;
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Estilos para el canvas de confeti */
.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1001; /* Por encima del popup (1000) para que el confeti caiga sobre él */
    pointer-events: none; /* Permite hacer clic a través del canvas */
    display: none; /* Oculto por defecto */
}

/* Estilos para el popup del premio */
.premio-popup {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 69%);
    animation: fadeIn 0.5s;
    will-change: opacity; /* Optimiza cambios de opacidad */
    backface-visibility: hidden; /* Reduce parpadeos */
    -webkit-backface-visibility: hidden;
}

.premio-popup-content {
    /* background-color: #fff; */
    padding: 40px;
    border-radius: 20px;
    width: 92%;
    max-width: 455px;
    text-align: center;
    /* box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0); /* Fuerza aceleración por hardware */
    -webkit-transform: translate(-50%, -50%) translateZ(0);
    animation: slideUpIn 0.7s cubic-bezier(0.18, 0.89, 0.32, 1.15);
    margin-left: 0; /* Asegura que no haya margen izquierdo que pueda afectar el centrado */
    margin-right: 0; /* Asegura que no haya margen derecho que pueda afectar el centrado */
    will-change: transform, opacity; /* Optimiza transformaciones y cambios de opacidad */
    backface-visibility: hidden; /* Reduce parpadeos */
    -webkit-backface-visibility: hidden;
}

.premio-popup-header {
    margin-bottom: 20px;
}

.premio-popup-header h2 {
    color: #1a4570;
    font-size: 42px;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.premio-popup-header h3 {
    color: #333;
    font-size: 32px;
    margin-bottom: 10px;
}

.premio-popup-body {
    margin-bottom: 30px;
}

.premio-popup-body img {
    max-width: 75%; /* Reducido significativamente para pantallas Mac */
    height: auto;
    margin-bottom: 20px;
    margin-top: 15px;
    border-radius: 12px;
    /* box-shadow: 0 8px 15px rgba(0, 0, 0, 0.25); */
    transition: opacity 0.3s ease;
}

/* Estilos para el indicador de carga */
.premio-popup-body img.loading {
    opacity: 0.7;
    animation: pulse-loading 1.5s infinite ease-in-out;
}

@keyframes pulse-loading {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

.premio-popup-body h3 {
    color: #d32f2f;
    font-size: 36px;
    font-weight: bold;
    margin-top: 15px;
}

.premio-popup-button {
    background-color: #1a4570;
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.premio-popup-button:hover {
    background-color: #2c5c8e;
    transform: scale(1.05);
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-popup:hover {
    color: #555;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideUpIn {
    from {transform: translate(-50%, calc(-50% + 400px)); opacity: 0;}
    to {transform: translate(-50%, -50%); opacity: 1;}
}

/* Estilos específicos para MacBook Pro y Air de 13 pulgadas */
@media (min-width: 1280px) and (max-width: 1440px) and (min-height: 800px) and (max-height: 900px) {
    :root {
        --wheel-size: 560px; /* Reducido al 80% de 700px */
        --wheel-font-size: 16px;
        --wheel-center-size: 104px; /* Reducido al 80% */
        --sector-image-size: 88px; /* Reducido al 80% */
        --top-margin: 60px;
    }
    
    .sector-image {
        top: 12px;
        width: 46%;
        transform: rotate(22deg);
    }
    
    .wheel-center {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .top-image {
        max-width: 85%;
    }
    
    .background-image {
        max-width: 145%;
        top: -16%;
    }
    
    .main-container {
        padding: 1.5rem;
    }
    
    .premio-popup-content {
        width: 90%;
        max-width: 450px;
        padding: 20px;
        border-radius: 15px;
    }
    
    .premio-popup-header h2 {
        font-size: 26px;
        margin-bottom: 8px;
    }
    
    .premio-popup-header h3 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .premio-popup_body h3 {
        font-size: 24px;
        margin-top: 8px;
    }
    
    .premio-popup-body img {
        max-width: 85%;
        margin-bottom: 15px;
        margin-top: 10px;
    }
    
    .premio-popup-button {
        padding: 10px 25px;
        font-size: 18px;
        margin-top: 12px;
    }
    
    .close-popup {
        top: 5px;
        right: 12px;
        font-size: 22px;
    }
}

/* Estilos específicos para MacBook Pro de 14 pulgadas */
@media (min-width: 1512px) and (max-width: 1680px) and (min-height: 982px) and (max-height: 1050px) {
    :root {
        --wheel-size: 640px; /* Reducido al 80% de 800px */
        --wheel-font-size: 18px;
        --wheel-center-size: 112px; /* Reducido al 80% */
        --sector-image-size: 96px; /* Reducido al 80% */
        --top-margin: 70px;
    }
    
    .sector-image {
        top: 14px;
        width: 46.5%;
        transform: rotate(22deg);
    }
    
    .wheel-center {
        font-size: 30px;
        line-height: 1.2;
    }
    
    .top-image {
        max-width: 86%;
    }
    
    .background-image {
        max-width: 148%;
        top: -16%;
    }
    
    .main-container {
        padding: 1.6rem;
    }
    
    .premio-popup-content {
        width: 90%;
        max-width: 480px;
        padding: 22px;
        border-radius: 15px;
    }
    
    .premio-popup-header h2 {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .premio-popup-header h3 {
        font-size: 22px;
        margin-bottom: 6px;
    }
    
    .premio-popup_body h3 {
        font-size: 26px;
        margin-top: 8px;
    }
    
    .premio-popup-body img {
        max-width: 85%;
        margin-bottom: 15px;
        margin-top: 10px;
    }
    
    .premio-popup-button {
        padding: 12px 26px;
        font-size: 18px;
        margin-top: 12px;
    }
    
    .close-popup {
        top: 5px;
        right: 12px;
        font-size: 22px;
    }
}

/* Estilos específicos para MacBook Pro de 16 pulgadas */
@media (min-width: 1728px) and (max-width: 1920px) and (min-height: 1117px) and (max-height: 1200px) {
    :root {
        --wheel-size: 720px; /* Reducido al 80% de 900px */
        --wheel-font-size: 20px;
        --wheel-center-size: 120px; /* Reducido al 80% */
        --sector-image-size: 104px; /* Reducido al 80% */
        --top-margin: 75px;
    }
    
    .sector-image {
        top: 16px;
        width: 46.8%;
        transform: rotate(22deg);
    }
    
    .wheel-center {
        font-size: 31px;
        line-height: 1.2;
    }
    
    .top-image {
        max-width: 87%;
    }
    
    .background-image {
        max-width: 149%;
        top: -16%;
    }
    
    .main-container {
        padding: 1.7rem;
    }
    
    .premio-popup-content {
        width: 90%;
        max-width: 500px;
        padding: 24px;
        border-radius: 15px;
    }
    
    .premio-popup-header h2 {
        font-size: 30px;
        margin-bottom: 8px;
    }
    
    .premio-popup-header h3 {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .premio-popup_body h3 {
        font-size: 28px;
        margin-top: 8px;
    }
    
    .premio-popup-body img {
        max-width: 85%;
        margin-bottom: 15px;
        margin-top: 10px;
    }
    
    .premio-popup-button {
        padding: 12px 28px;
        font-size: 20px;
        margin-top: 12px;
    }
    
    .close-popup {
        top: 5px;
        right: 12px;
        font-size: 22px;
    }
}

/* Estilos específicos para MacBook Pro con pantalla Retina */
@media (min-width: 2560px) and (max-width: 2880px) and (min-height: 1600px) and (max-height: 1800px) {
    :root {
        --wheel-size: 800px; /* Reducido al 80% de 1000px */
        --wheel-font-size: 22px;
        --wheel-center-size: 128px; /* Reducido al 80% */
        --sector-image-size: 112px; /* Reducido al 80% */
        --top-margin: 80px;
    }
    
    .sector-image {
        top: 18px;
        width: 47%;
        transform: rotate(22deg);
    }
    
    .wheel-center {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .top-image {
        max-width: 88%;
    }
    
    .background-image {
        max-width: 150%;
        top: -16%;
    }
    
    .main-container {
        padding: 1.8rem;
    }
    
    .premio-popup-content {
        width: 90%;
        max-width: 520px;
        padding: 26px;
        border-radius: 15px;
    }
    
    .premio-popup-header h2 {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .premio-popup-header h3 {
        font-size: 24px;
        margin-bottom: 6px;
    }
    
    .premio-popup_body h3 {
        font-size: 28px;
        margin-top: 8px;
    }
    
    .premio-popup-body img {
        max-width: 85%;
        margin-bottom: 15px;
        margin-top: 10px;
    }
    
    .premio-popup-button {
        padding: 14px 30px;
        font-size: 20px;
        margin-top: 12px;
    }
    
    .close-popup {
        top: 5px;
        right: 12px;
        font-size: 22px;
    }
}

/* Estilos especiales para tablets */
@media (min-width: 768px) and (max-width: 1200px) {
    .premio-popup-content {
        width: 45%;
        padding: 50px;
        max-width: 950px;
        border-radius: 22px;
    }
    
    .premio-popup-body img {
        max-width: 50%;
        margin-bottom: 25px;
    }
}

/* Estilos responsive para el popup */
@media (max-width: 767px) {
    .premio-popup-content {
        width: 92%;
        padding: 25px;
        max-width: 445px;
    }
    
    .premio-popup-header h2 {
        font-size: 30px;
    }
    
    .premio-popup-header h3 {
        font-size: 22px;
    }
    
    .premio-popup_body h3 {
        font-size: 24px;
    }
    
    .premio-popup-button {
        padding: 12px 30px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .premio-popup-content {
        padding: 15px;
        width: 95%;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .premio-popup-header h2 {
        font-size: 26px;
    }
    
    .premio-popup-header h3 {
        font-size: 20px;
    }
    
    .premio-popup_body h3 {
        font-size: 22px;
    }
    
    .premio-popup-button {
        padding: 10px 25px;
        font-size: 16px;
    }
    
    /* Ajustar la animación para que sea más rápida en móviles */
    .premio-popup-content {
        animation-duration: 0.5s;
    }
}

/* Media queries específicas para tablets y móviles */
@media (max-width: 1024px) {
    :root {
        --wheel-size: min(900px, 50vw);
    }

    .container {
        width: min(var(--wheel-size), 50vw);
        margin: 0 auto;
    }

    .background-image {
        max-width: min(140%, 100vw);
    }
}

@media (max-width: 768px) {
    :root {
        --wheel-size: min(600px, 92vw);
        --wheel-font-size: 14px;
        --wheel-center-size: 90px;
    }

    .container {
        width: min(var(--wheel-size), 92vw);
    }

    .background-image {
        max-width: min(130%, 100vw);
    }
    
    .sector-text {
        width: min(var(--sector-text-width), 80px);
        font-size: calc(var(--wheel-font-size) * 0.8);
    }
}
