:root {
    --primary-color: #6366f1;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-dark: #1f2937;
    --text-light: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Títulos y textos */
.game-title {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    text-align: center;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

/* Estilo neón para el título principal */
.neon-title {
    color: #fff;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,
        0 0 20px #6366f1,
        0 0 35px #6366f1,
        0 0 40px #6366f1,
        0 0 50px #6366f1,
        0 0 75px #6366f1;
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 100% {
        text-shadow: 
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 15px #fff,
            0 0 20px #6366f1,
            0 0 35px #6366f1,
            0 0 40px #6366f1,
            0 0 50px #6366f1,
            0 0 75px #6366f1;
    }
    50% {
        text-shadow: 
            0 0 2px #fff,
            0 0 5px #fff,
            0 0 8px #fff,
            0 0 15px #6366f1,
            0 0 30px #6366f1,
            0 0 35px #6366f1,
            0 0 40px #6366f1,
            0 0 60px #6366f1;
    }
}

.page-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    text-align: center;
    color: var(--text-dark);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.tagline {
    text-align: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

/* Pantalla de bienvenida */
.welcome-screen {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 50px auto;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.3rem;
    flex-direction: column;
    gap: 5px;
}

.btn-large small {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.9;
}

.btn-icon {
    font-size: 1.5em;
}

/* Formularios */
.input-field {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Premios */
.prizes-section {
    margin: 30px 0;
}

.prizes-section h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.prize-item {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.prize-item:hover {
    background: #e5e7eb;
}

.prize-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.prize-icon {
    font-size: 1.5rem;
}

.prize-value {
    margin-left: auto;
    width: 100px;
    padding: 5px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
}

/* QR Display */
.qr-display-screen {
    background: var(--card-bg);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 30px auto;
    text-align: center;
}

.qr-container {
    margin: 30px 0;
}

.qr-container img {
    max-width: 300px;
    margin: 0 auto;
    display: block;
    border: 10px solid white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.player-avatar {
    text-align: center;
}

.player-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.player-avatar .player-name {
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Foto */
.photo-section {
    display: flex;
    gap: 20px;
    align-items: center;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border: 3px dashed #d1d5db;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-size: 3rem;
    color: #9ca3af;
}

.photo-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
}

.modal-content video {
    width: 100%;
    border-radius: 10px;
    margin: 20px 0;
}

/* Animaciones */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Loading spinner inline */
.loading-spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes pulse-rainbow {
    0% { box-shadow: 0 0 20px red; }
    25% { box-shadow: 0 0 20px yellow; }
    50% { box-shadow: 0 0 20px green; }
    75% { box-shadow: 0 0 20px blue; }
    100% { box-shadow: 0 0 20px purple; }
}

@keyframes spin-and-grow {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Número de la suerte */
.lucky-number {
    font-size: 2rem;
    text-align: center;
    font-weight: bold;
}

.lucky-hint {
    text-align: center;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-top: 5px;
    font-weight: 600;
}

/* Features */
.features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.feature-icon {
    font-size: 1.5rem;
}

/* Divider */
.or-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e5e7eb;
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.or-divider span {
    background: var(--card-bg);
    padding: 0 15px;
    color: var(--text-light);
    font-weight: 600;
}

/* Button containers */
.create-button-container,
.join-button-container {
    display: flex;
    justify-content: center;
}

/* Join section */
.join-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

.join-section .input-field {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .game-title {
        font-size: 3rem;
    }
    
    .welcome-screen {
        padding: 30px;
    }
    
    .prizes-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-section {
        flex-direction: column;
    }
    
    .join-section {
        flex-direction: column;
    }
    
    .join-section .input-field {
        width: 100%;
    }
}