/* Reset y configuración global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    /* COLORES RIFALACHINITA - Mejorados */
    --flame-red: #FFD700;          /* Dorado brillante principal */
    --dark-red: #E6C200;           /* Dorado intenso para hover */
    --rider-purple: #8A2BE2;       /* Púrpura vibrante (BlueViolet) */
    --deep-purple: #6A1B9A;        /* Púrpura profundo pero no tan oscuro */
    --logo-black: #0D1117;         /* Negro base */
    --card-black: #1A1A2E;         /* Azul oscuro en lugar de negro puro */
    --darker-black: #16213E;       /* Azul marino profundo */
    --pure-white: #FFFFFF;         /* Blanco puro */
    --light-gray: #2D2D44;         /* Gris azulado para tarjetas */
    --border-gray: #4A4A6A;        /* Bordes visibles pero suaves */
    --text-gray: #E0E0F0;          /* Texto claro con tinte púrpura */
    --text-light: #FFFFFF;         /* Texto principal */
    --success-green: #32CD32;      /* Verde éxito */
    --warning-orange: #FF8C00;     /* Naranja vibrante */
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-red: rgba(255, 215, 0, 0.4);     /* Sombra dorada más intensa */
    --shadow-purple: rgba(138, 43, 226, 0.3); /* Sombra púrpura vibrante */
}

/* CONFIGURACIÓN BASE RESPONSIVE - SIN SCROLL HORIZONTAL */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    background: var(--logo-black);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

.container {
    max-width: 500px;
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 15px;
    background: var(--card-black);
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

/* HEADER SIMPLE COMO HENKO */
header {
    text-align: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

/* LOGO EXACTAMENTE COMO HENKO CON COLORES THESHOW2001 */
.logo {
    max-width: 150px;
    margin: 0 auto 1rem auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 0 15px var(--shadow-red);
}

.header-title {
    letter-spacing: 1px;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--pure-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.header-title2 {
    color: var(--flame-red);
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* IMAGEN DESTACADA EXACTAMENTE COMO HENKO CON COLORES THESHOW2001 */
.featured-image {
    width: 100%;
    border-radius: 20px;
    border: 2px solid var(--flame-red);
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px var(--shadow-red);
    transition: transform 0.3s;
}

.featured-image:hover {
    transform: scale(1.02);
}

.section-title {
    margin: 2rem 0 1.5rem 0;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--flame-red);
    border-radius: 2px;
}

/* PREMIOS OSCUROS */
.prizes-section {
    margin: 2rem 0;
    background: var(--light-gray);
    border-radius: 15px;
    padding: clamp(1rem, 4vw, 2rem);
    box-shadow: 0 8px 25px var(--shadow-red);
    border: 2px solid var(--flame-red);
    position: relative;
    overflow: hidden;
}

.prizes-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--flame-red), var(--rider-purple), var(--flame-red));
}

.prizes-title {
    text-align: center;
    color: var(--flame-red);
    font-size: clamp(1.3rem, 5vw, 2rem);
    margin-bottom: 2rem;
    font-weight: 700;
}

.prizes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.prize-card {
    background: var(--card-black);
    border-radius: 15px;
    padding: clamp(1rem, 3vw, 1.5rem);
    position: relative;
    border: 2px solid var(--border-gray);
    transition: all 0.3s ease;
}

.prize-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-purple);
    border-color: var(--rider-purple);
}

.prize-badge {
    position: absolute;
    top: -12px;
    left: 15px;
    background: var(--flame-red);
    color: var(--pure-white);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.first-prize .prize-badge {
    background: #FFD700;
    color: var(--text-light);
}

.second-prize .prize-badge {
    background: #C0C0C0;
    color: var(--text-light);
}

.prize-card h4 {
    color: var(--text-light);
    margin: 1rem 0 0.5rem 0;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 600;
    line-height: 1.3;
}

.prize-description {
    color: #FFFFFF;
    line-height: 1.5;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.lottery-info {
    color: var(--rider-purple);
    font-style: italic;
    font-weight: 500;
}

/* MODO SELECTOR */
.mode-selector {
    margin: 2rem 0;
    background: var(--light-gray);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-gray);
}

.mode-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.mode-tab {
    flex: 1;
    max-width: 200px;
    padding: 1rem;
    background: var(--card-black);
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
}

.mode-tab:hover {
    border-color: var(--flame-red);
    background: rgba(255, 215, 0, 0.1);
}

.mode-tab.active {
    border-color: var(--flame-red);
    background: var(--flame-red);
    color: var(--logo-black);
    font-weight: bold;
}

.mode-tab i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* RANKING OSCURO */
.ranking-section {
    margin: 2rem 0;
    background: var(--light-gray);
    border-radius: 15px;
    padding: clamp(1rem, 3vw, 1.5rem);
    box-shadow: 0 8px 20px var(--shadow-light);
    border: 1px solid var(--border-gray);
}

.ranking-title {
    text-align: center;
    color: var(--rider-purple);
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-black);
    padding: clamp(0.8rem, 2vw, 1rem);
    margin: 0.8rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-gray);
    transition: all 0.3s ease;
    min-height: 60px;
}

.ranking-item:hover {
    background: rgba(128, 90, 213, 0.15);
    border-color: var(--rider-purple);
}

.ranking-position {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.ranking-position.gold { color: #FFD700; }
.ranking-position.silver { color: #C0C0C0; }
.ranking-position.bronze { color: #CD7F32; }

.ranking-email {
    flex: 1;
    margin: 0 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    word-break: break-word;
    text-align: left;
    overflow-wrap: break-word;
}

.ranking-tickets {
    background: var(--flame-red);
    color: var(--pure-white);
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2.5vw, 15px);
    border-radius: 20px;
    font-weight: bold;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

.loading-ranking {
    text-align: center;
    color: #FFFFFF;
    padding: 2rem;
    font-style: italic;
}

/* SELECTOR DE TICKETS OSCURO */
.ticket-selector {
    margin: 2rem 0;
    background: var(--light-gray);
    border-radius: 15px;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--border-gray);
    box-shadow: 0 6px 15px var(--shadow-light);
}

.ticket-selector-title {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 1rem;
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
}

.ticket-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    gap: clamp(10px, 3vw, 20px);
    flex-wrap: wrap;
}

.counter-btn {
    background: var(--flame-red);
    border: none;
    color: var(--pure-white);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: bold;
    cursor: pointer;
    width: clamp(40px, 10vw, 45px);
    height: clamp(40px, 10vw, 45px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.counter-btn:hover {
    background: var(--rider-purple);
    transform: scale(1.1);
    box-shadow: 0 6px 15px var(--shadow-purple);
}

.counter-btn.large-increment {
    width: auto;
    padding: 0 clamp(15px, 4vw, 20px);
    border-radius: 25px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.counter-display {
    color: var(--text-light) !important;
    font-size: clamp(1.8rem, 6vw, 2.2rem);
    color: var(--rider-purple);
    min-width: clamp(60px, 15vw, 80px);
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.random-numbers-message {
    text-align: center;
    margin: 1rem 0;
    padding: 12px;
    background: rgba(128, 90, 213, 0.15);
    border-radius: 10px;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--rider-purple);
    font-weight: 600;
    border: 1px solid var(--rider-purple);
}

.ticket-price-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-gray);
    flex-wrap: wrap;
    gap: 10px;
}

.price-per-ticket, .total-price {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 500;
    color: var(--text-light);
}

.total-price {
    font-weight: 700;
    color: var(--rider-purple);
}

/* ESTILOS PARA EL DESCUENTO DEL 12.5% */
.discount-info {
    margin: 1rem 0;
    animation: slideInDiscount 0.5s ease-in-out;
}

.discount-badge {
    background: linear-gradient(135deg, var(--success-green), #059669);
    color: var(--pure-white);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: bold;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    border: 2px solid #059669;
    position: relative;
    overflow: hidden;
}

.discount-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

.discount-badge i {
    margin-right: 0.5rem;
    font-size: clamp(1rem, 3vw, 1.2rem);
    animation: pulse 2s infinite;
}

.discount-badge span {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animaciones para el descuento */
@keyframes slideInDiscount {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* SELECCIÓN MANUAL */
.manual-selector {
    margin: 2rem 0;
    background: var(--light-gray);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-gray);
}

.manual-selector-title {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 600;
}

.selection-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-black);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-gray);
}

.selected-count {
    color: var(--text-light);
    font-weight: 500;
}

.total-manual-price {
    color: var(--flame-red);
    font-weight: bold;
    font-size: 1.1rem;
}

/* NÚMEROS SELECCIONADOS DISPLAY */
.selected-numbers-display {
    background: var(--card-black);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px solid var(--flame-red);
}

.selected-numbers-display h4 {
    color: var(--flame-red);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    text-align: center;
}

.selected-numbers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 100px;
    overflow-y: auto;
    justify-content: center;
}

.selected-number-tag {
    background: var(--flame-red);
    color: var(--logo-black);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
}

/* BUSCADOR */
.number-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.number-search input {
    flex: 1;
    padding: 0.8rem;
    background: var(--card-black);
    border: 2px solid var(--border-gray);
    color: var(--text-light);
    border-radius: 8px;
    font-size: 1rem;
}

.number-search input:focus {
    outline: none;
    border-color: var(--flame-red);
}

.search-btn, .clear-btn {
    padding: 0.8rem 1rem;
    background: var(--flame-red);
    color: var(--pure-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.clear-btn {
    background: #dc2626;
}

.search-btn:hover, .clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* MENSAJES DE BÚSQUEDA BONITOS */
.search-message {
    display: none;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease-in-out;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-message-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-message-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.search-message-text {
    flex: 1;
    line-height: 1.4;
}

/* Tipos de mensajes */
.search-message-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.search-message-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

.search-message-occupied {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.05));
    color: #ea580c;
    border-color: rgba(249, 115, 22, 0.3);
}

.search-message-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.3);
}

/* BOTÓN DE SELECCIÓN RÁPIDA */
.quick-select-btn {
    display: none;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--flame-red), var(--dark-red));
    color: var(--pure-white);
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    animation: bounceIn 0.5s ease-in-out;
}

.quick-select-btn:hover {
    background: linear-gradient(135deg, var(--dark-red), var(--flame-red));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

.quick-select-btn i {
    margin-right: 0.5rem;
}

/* PAGINACIÓN */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-black);
    border-radius: 10px;
    border: 1px solid var(--border-gray);
}

.page-btn {
    padding: 0.8rem 1rem;
    background: var(--flame-red);
    color: var(--pure-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: var(--dark-red);
}

.page-btn:disabled {
    background: var(--border-gray);
    cursor: not-allowed;
}

.page-info {
    text-align: center;
    color: var(--text-light);
    font-weight: 500;
}

/* GRILLA DE NÚMEROS */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-black);
    border-radius: 10px;
    border: 1px solid var(--border-gray);
}

.number-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--text-light);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    user-select: none;
    min-height: 35px;
}

.number-cell:hover {
    border-color: var(--flame-red);
    background: rgba(255, 215, 0, 0.1);
}

.number-cell.selected {
    background: var(--flame-red);
    color: var(--logo-black);
    border-color: var(--dark-red);
    font-weight: bold;
}

/* NÚMEROS OCUPADOS - ESTILO MEJORADO */
.number-cell.occupied {
    background: #dc2626 !important; /* Rojo intenso */
    color: var(--pure-white) !important;
    cursor: not-allowed !important;
    border-color: #b91c1c !important; /* Borde rojo más oscuro */
    opacity: 0.8; /* Ligeramente transparente para diferenciarlo */
    font-weight: bold;
    position: relative;
}

.number-cell.occupied:hover {
    background: #dc2626 !important; /* Mantener el mismo color en hover */
    border-color: #991b1b !important;
    opacity: 1; /* Hacer más visible en hover */
    transform: none !important; /* No hacer efecto de scale */
}

.number-cell.occupied:before {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
}

/* RESALTADOS MEJORADOS */
.number-cell.highlighted-available {
    animation: highlight-available 2s ease-in-out;
    background: var(--success-green) !important;
    color: var(--pure-white) !important;
    transform: scale(1.1);
    z-index: 10;
    position: relative;
    border-color: #059669 !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.number-cell.highlighted-occupied {
    animation: highlight-occupied 2s ease-in-out;
    background: var(--warning-orange) !important;
    color: var(--pure-white) !important;
    transform: scale(1.1);
    z-index: 10;
    position: relative;
    border-color: #ea580c !important;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.number-cell.highlighted {
    animation: highlight-pulse 2s ease-in-out;
    background: var(--warning-orange) !important;
    color: var(--logo-black) !important;
    transform: scale(1.05);
    z-index: 10;
    position: relative;
}

/* SALTO RÁPIDO */
.quick-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    color: var(--text-light);
}

.quick-page input {
    width: 80px;
    padding: 0.5rem;
    background: var(--card-black);
    border: 1px solid var(--border-gray);
    color: var(--text-light);
    border-radius: 6px;
    text-align: center;
}

.quick-page button {
    padding: 0.5rem 1rem;
    background: var(--flame-red);
    color: var(--pure-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* SECCIÓN DE PAGOS OSCURA */
.payment-section {
    margin-top: 2rem;
}

/* ACTUALIZACIÓN: Pestañas de moneda mejoradas para USD y CLP */

.currency-tabs {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow-light);
    gap: 2px; /* Pequeño espacio entre pestañas */
}

.currency-tab {
    flex: 1;
    text-align: center;
    padding: clamp(0.8rem, 2vw, 1rem);
    background: var(--card-black);
    color: var(--text-light);
    cursor: pointer;
    border-top: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: clamp(0.8rem, 2vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.currency-tab:first-child {
    border-radius: 12px 0 0 0;
}

.currency-tab:last-child {
    border-radius: 0 12px 0 0;
}

.currency-tab.active {
    background: var(--flame-red);
    border-top: 3px solid var(--dark-red);
    color: var(--pure-white);
    font-weight: bold;
    box-shadow: 0 2px 8px var(--shadow-red);
}

.currency-tab:hover:not(.active) {
    background: rgba(229, 62, 62, 0.15);
    border-top-color: var(--flame-red);
    transform: translateY(-1px);
}

.currency-tab i {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.currency-tab span {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .currency-tabs {
        flex-direction: row;
        overflow-x: hidden; /* Quitar scroll */
        gap: 2px;
        justify-content: space-between; /* Distribuir equitativamente */
    }
    
    .currency-tab {
        font-size: 0.75rem;
        padding: 0.6rem 0.4rem;
        flex: 1; /* Que cada pestaña ocupe espacio igual */
        flex-shrink: 1;
        min-width: 0; /* Permitir que se reduzcan */
        flex-direction: column;
        gap: 0.2rem;
        text-align: center;
    }
    
    .currency-tab span {
        font-size: 0.65rem;
        line-height: 1.1;
        word-break: break-word; /* Permitir que el texto se ajuste */
    }
}

@media (max-width: 480px) {
    .currency-tab {
        padding: 0.5rem 0.2rem;
        font-size: 0.7rem;
    }
    
    .currency-tab span {
        font-size: 0.6rem;
    }
}

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

.account-info {
    background: var(--card-black);
    border-radius: 12px;
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: 1rem 0;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-gray);
    transition: all 0.3s ease;
}

.account-info:hover {
    border-color: var(--flame-red);
    box-shadow: 0 8px 20px var(--shadow-red);
}

.account-info h3 {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    margin-bottom: 1rem;
    color: var(--rider-purple);
    font-weight: 600;
}

.account-detail {
    margin-bottom: 0.8rem;
    padding-left: 15px;
    border-left: 3px solid var(--flame-red);
    color: var(--text-light);
    line-height: 1.5;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.total-transfer-box {
    background: var(--flame-red);
    color: var(--pure-white);
    font-weight: bold;
    padding: clamp(15px, 4vw, 20px);
    margin: 20px 0;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px var(--shadow-red);
    font-size: clamp(1rem, 3vw, 1.2rem);
    border: 2px solid var(--dark-red);
    transition: all 0.3s ease;
}

.total-transfer-box:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px var(--shadow-red);
}

.total-transfer-box .total-amount {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    margin-top: 8px;
    display: block;
    color: var(--pure-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* FORMULARIO OSCURO */
.form-section {
    background: var(--light-gray);
    border-radius: 15px;
    padding: clamp(1.5rem, 4vw, 2rem);
    margin-top: 2rem;
    border: 1px solid var(--border-gray);
    box-shadow: 0 8px 25px var(--shadow-light);
}

.form-title {
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1.3;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group input, .form-group select {
    width: 100%;
    padding: clamp(10px, 2.5vw, 12px);
    background: var(--card-black);
    border: 2px solid var(--border-gray);
    color: var(--text-light);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-group input::placeholder {
    color: #FFFFFF;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.form-group input:focus {
    outline: none;
    border-color: var(--flame-red);
    background: var(--darker-black);
    box-shadow: 0 0 10px var(--shadow-red);
}

.error-message {
    color: var(--flame-red);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

.file-upload-container {
    margin-bottom: 2rem;
}

.file-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    background: var(--card-black);
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 12px;
    cursor: pointer;
    border: 2px dashed var(--flame-red);
    transition: all 0.3s ease;
}

.file-upload:hover {
    background: rgba(229, 62, 62, 0.15);
    border-color: var(--rider-purple);
}

.file-upload i {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--flame-red);
    margin-right: 12px;
}

.file-upload-text {
    color: var(--rider-purple);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 600;
}

.upload-instruction {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #FFFFFF;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: rgba(229, 62, 62, 0.15);
    border-radius: 8px;
    border: 1px solid var(--flame-red);
    line-height: 1.4;
}

.file-preview {
    margin-top: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-content img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    border: 2px solid var(--flame-red);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.file-name {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--rider-purple);
    margin: 10px 0;
    font-weight: 500;
    word-break: break-word;
    text-align: center;
}

.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--flame-red);
    color: var(--pure-white);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.remove-file:hover {
    background: var(--dark-red);
    transform: scale(1.1);
}

.submit-btn {
    background: var(--flame-red);
    color: var(--pure-white);
    border: none;
    padding: clamp(12px, 3vw, 15px);
    width: 100%;
    border-radius: 25px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 6px 15px var(--shadow-red);
    border: 2px solid var(--dark-red);
}

.submit-btn:hover {
    background: var(--rider-purple);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow-purple);
}

.whatsapp-btn {
    display: block;
    background: #25D366;
    color: var(--pure-white);
    font-weight: bold;
    text-align: center;
    padding: clamp(12px, 3vw, 15px);
    border-radius: 25px;
    margin: 20px auto;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    width: 100%;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn i {
    margin-right: 10px;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.success-message {
    background: rgba(35, 134, 54, 0.15);
    color: var(--success-green);
    padding: clamp(12px, 3vw, 15px);
    border-radius: 10px;
    text-align: center;
    margin-top: 1rem;
    border: 2px solid var(--success-green);
    display: none;
    font-weight: 500;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

#form-error {
    background: rgba(229, 62, 62, 0.15);
    color: var(--flame-red);
    padding: clamp(12px, 3vw, 15px);
    border-radius: 10px;
    text-align: center;
    margin-top: 1rem;
    border: 2px solid var(--flame-red);
    display: none;
    font-weight: 500;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

/* FOOTER OSCURO */
.footer {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-gray);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #FFFFFF;
}

.developer-credits {
    margin-top: 20px;
    padding: clamp(12px, 3vw, 15px);
    background: var(--card-black);
    border-radius: 12px;
    color: var(--text-light);
    text-align: center;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--flame-red);
    line-height: 1.4;
}

.developer-credits a {
    color: var(--rider-purple);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.developer-credits a:hover {
    color: var(--flame-red);
    text-decoration: underline;
}

/* ANIMACIONES */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes highlight-available {
    0%, 100% { 
        background: var(--success-green);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    }
    50% { 
        background: #059669;
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.8);
    }
}

@keyframes highlight-occupied {
    0%, 100% { 
        background: var(--warning-orange);
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
    }
    50% { 
        background: #ea580c;
        box-shadow: 0 0 30px rgba(249, 115, 22, 0.8);
    }
}

@keyframes highlight-pulse {
    0% { background: var(--warning-orange); }
    50% { background: var(--flame-red); }
    100% { background: var(--warning-orange); }
}

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .logo {
        max-width: 120px;
        margin-bottom: 1rem;
    }
    
    .featured-image {
        margin-bottom: 1.5rem;
    }
    
    .numbers-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 3px;
    }
    
    .number-cell {
        font-size: 0.7rem;
        min-height: 35px;
    }
    
    .number-cell.occupied:before {
        font-size: 6px;
        top: 1px;
        right: 1px;
    }
    
    .mode-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .selection-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .selected-number-tag {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: 30px;
    }
    
    .discount-badge {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .discount-badge i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {    
    .logo {
        max-width: 120px;
        margin-bottom: 1rem;
    }
    
    .mode-tabs {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .mode-tab {
        padding: 1rem;
        min-height: 60px;
        font-size: 0.9rem;
        max-width: none;
    }
    
    .mode-tab i {
        font-size: 1.3rem;
    }
    
    /* FIX SELECTOR ALEATORIO MÓVIL */
    .ticket-counter {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 1rem 0;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .counter-btn.large-increment {
        padding: 0 8px;
        font-size: 0.7rem;
        min-width: 45px;
        height: 35px;
        border-radius: 18px;
    }
    
    .counter-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        border-radius: 50%;
    }
    
    .counter-display {
        font-size: 1.5rem;
        min-width: 50px;
        margin: 0 5px;
    }
    
    .featured-image {
        margin-bottom: 1.5rem;
        border-radius: 15px;
    }
    
    .ranking-item {
        padding: 1rem 0.8rem;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.8rem;
        min-height: 60px;
    }
    
    .ranking-position {
        font-size: 1.2rem;
        min-width: 40px;
        flex-shrink: 0;
    }
    
    .ranking-email {
        font-size: 0.85rem;
        margin: 0 0.5rem;
        flex: 1;
        text-align: left;
        line-height: 1.3;
        word-break: break-word;
    }
    
    .ranking-tickets {
        font-size: 0.8rem;
        padding: 6px 10px;
        min-width: auto;
        flex-shrink: 0;
    }
    
    .container {
        margin: 10px;
        padding: 15px;
        width: calc(100% - 20px);
        overflow-x: hidden;
    }
    
    header {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 0;
    }
    
    .currency-tabs {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .currency-tab {
        font-size: 0.9rem;
        padding: 1rem;
        flex-shrink: 0;
        min-width: 120px;
    }
    
    .form-group input,
    .form-group select {
        min-width: 0;
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .numbers-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 2px;
        padding: 0.8rem;
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
    }
    
    .number-cell {
        font-size: clamp(0.6rem, 1.5vw, 0.7rem);
        min-height: 35px;
        font-weight: 600;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* FIX BUSCADOR MÓVIL - MÁS PEQUEÑO */
    .number-search {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .number-search input {
        padding: 0.8rem;
        font-size: 1rem;
        height: 40px;
        width: 100%;
    }
    
    .search-btn, .clear-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
        height: 40px;
        width: 100%;
    }
    
    .selection-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    
    .selected-count {
        font-size: 1rem;
    }
    
    .total-manual-price {
        font-size: 1.2rem;
    }
    
    /* FIX PAGINACIÓN MÓVIL - HORIZONTAL Y COMPACTA */
    .pagination-controls {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.8rem;
        align-items: center;
        justify-content: space-between;
    }
    
    .page-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        height: 35px;
        min-width: 50px;
        flex-shrink: 0;
    }
    
    .page-info {
        font-size: 0.8rem;
        text-align: center;
        flex: 1;
        margin: 0 0.5rem;
        line-height: 1.2;
    }
    
    .selected-number-tag {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: 30px;
    }
    
    .discount-badge {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* MENSAJES MÓVIL */
    .search-message {
        padding: 0.875rem;
        margin: 0.875rem 0;
    }
    
    .search-message-content {
        gap: 0.5rem;
    }
    
    .search-message-icon {
        font-size: 1rem;
    }
    
    .search-message-text {
        font-size: 0.9rem;
    }
    
    .quick-select-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* CRÍTICO: PREVENIR SCROLL HORIZONTAL */
*, *::before, *::after {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

table {
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

/* Evitar zoom en inputs en iOS */
input[type="email"],
input[type="tel"],
input[type="text"],
input[type="number"],
select,
textarea {
    font-size: 16px !important;
}

/* Consistencia en tap highlights y selección de texto */
.account-detail,
.account-info,
.currency-details {
    -webkit-user-select: text !important;
    -khtml-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

input,
textarea,
[contenteditable] {
    -webkit-user-select: auto;
    -khtml-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
}

button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    outline: none;
    background: none;
    cursor: pointer;
}

input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* LANDSCAPE EN MÓVILES */
@media only screen and (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 10px;
        margin: 5px auto;
    }
    
    header {
        padding: 1rem;
        margin: 0 0 1rem 0;
    }
    
    .prizes-section,
    .ranking-section,
    .ticket-selector {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .section-title {
        margin: 1rem 0;
    }
}

/* FIXES PARA MÓVILES MUY PEQUEÑOS */
@media only screen and (max-width: 320px) {
    .container {
        margin: 2px;
        padding: 8px;
        width: calc(100% - 4px);
    }
    
    .logo {
        max-width: 110px;
    }
    
    .featured-image {
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    header {
        margin: 0 0 1rem 0;
        padding: 1rem 0.5rem;
    }
    
    .counter-btn.large-increment {
        padding: 0 8px;
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .counter-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}