/* ===========================================
   ESTILOS GENERALES Y VARIABLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales - Tema Atención (Naranja/Rojo) */
    --primary-color: #ff6b35;
    --primary-dark: #e85d2f;
    --primary-light: #ff8c61;
    --secondary-color: #ff9f1c;
    --accent-color: #ffbf69;
    
    /* Colores de fondo */
    --bg-dark: #1a1a2e;
    --bg-medium: #16213e;
    --bg-light: #0f3460;
    --bg-card: rgba(22, 33, 62, 0.9);
    
    /* Colores de texto */
    --text-primary: #ffffff;
    --text-secondary: #b8c1ec;
    --text-muted: #8892b0;
    
    /* Efectos */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.3);
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-light) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===========================================
   PARTÍCULAS DE FONDO
   =========================================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent);
    background-size: 200% 200%;
    animation: particlesMove 20s ease infinite;
    opacity: 0.3;
}

@keyframes particlesMove {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%, 80% 10%, 90% 60%, 33% 80%; }
    50% { background-position: 100% 100%, 0% 0%, 25% 75%, 70% 30%, 85% 55%, 40% 85%; }
}

/* ===========================================
   HEADER PRINCIPAL
   =========================================== */
.main-header {
    background: linear-gradient(135deg, var(--bg-medium) 0%, var(--bg-light) 100%);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 10;
    border-bottom: 3px solid var(--primary-color);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-section h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-section {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===========================================
   BREADCRUMB NAVIGATION
   =========================================== */
.breadcrumb {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
}

.breadcrumb-icon {
    font-size: 1.2rem;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.breadcrumb-current {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===========================================
   CONTENIDO PRINCIPAL
   =========================================== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ===========================================
   SALA HEADER
   =========================================== */
.sala-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.sala-icon-large {
    font-size: 5rem;
    animation: rotateIcon 3s ease-in-out infinite;
}

@keyframes rotateIcon {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.sala-info h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sala-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ===========================================
   MISIÓN DIARIA
   =========================================== */
.daily-mission {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 191, 105, 0.2), rgba(255, 159, 28, 0.2));
    border-radius: 15px;
    border: 2px solid var(--secondary-color);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.mission-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.mission-content {
    flex: 1;
}

.mission-content h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.mission-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.mission-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    font-weight: 700;
    color: var(--accent-color);
    min-width: 50px;
    text-align: right;
}

/* ===========================================
   GRID DE JUEGOS
   =========================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* ===========================================
   CARD DE JUEGO
   =========================================== */
.game-card {
    perspective: 1000px;
    height: 100%;
}

.game-card-inner {
    height: 100%;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.game-card:hover .game-card-inner {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.game-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-light), var(--bg-medium));
}

.game-image {
    width: 80%;
    height: 80%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.game-card:hover .game-image {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: var(--transition-normal);
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-difficulty {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.difficulty-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.difficulty-stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: #555;
    font-size: 1.2rem;
}

.star.filled {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(255, 159, 28, 0.5);
}

/* ===========================================
   INFO DEL JUEGO
   =========================================== */
.game-info {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.game-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.game-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-icon-small {
    font-size: 1.2rem;
}

/* ===========================================
   BOTÓN DE JUEGO
   =========================================== */
.game-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.game-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.game-button:hover::before {
    width: 300px;
    height: 300px;
}

.game-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(255, 107, 53, 0.5);
}

.game-button:active {
    transform: translateY(-1px);
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-icon {
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
    transition: var(--transition-fast);
}

.game-button:hover .button-icon {
    transform: translateX(5px);
}

/* ===========================================
   PRÓXIMAMENTE
   =========================================== */
.coming-soon {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.coming-soon h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.coming-soon p {
    color: var(--text-muted);
}

/* ===========================================
   FOOTER
   =========================================== */
.main-footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    background: var(--bg-medium);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
    }
    
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-section h1 {
        font-size: 1.5rem;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .stat-item {
        width: 100%;
        justify-content: center;
    }
    
    .sala-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sala-icon-large {
        font-size: 3.5rem;
    }
    
    .sala-info h2 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .daily-mission {
        flex-direction: column;
        text-align: center;
    }
}

/* ===========================================
   ANIMACIONES ADICIONALES
   =========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.6s ease forwards;
}

.game-card:nth-child(1) {
    animation-delay: 0.1s;
}

.game-card:nth-child(2) {
    animation-delay: 0.2s;
}

.game-card:nth-child(3) {
    animation-delay: 0.3s;
}