/* assets/index.css - Tema Cyber/Dark Premium para el Player Frontend */
:root {
    --bg-base: #09090b;
    --bg-surface: #18181b;
    --bg-elevated: #27272a;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.4);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.4);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #f43f5e;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-strong: #ffffff;
    --border-color: #3f3f46;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --dynamic-hex: #8b5cf6;
}

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

body {
    background-color: var(--bg-base); color: var(--text-main);
    font-family: var(--font-main); display: flex; justify-content: center;
    align-items: center; min-height: 100vh; overflow-x: hidden;
    padding: 1rem; position: relative;
}

/* Orbes de luz de fondo (Efecto Glassmorphism Extremo) */
body::before {
    content: ''; position: fixed; top: -200px; right: -200px; width: 600px; height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    border-radius: 50%; z-index: -1; pointer-events: none;
}
body::after {
    content: ''; position: fixed; bottom: -200px; left: -200px; width: 600px; height: 600px;
    background: radial-gradient(circle, var(--secondary-glow) 0%, transparent 60%);
    border-radius: 50%; z-index: -1; pointer-events: none;
}

.hub-container {
    background-color: rgba(24, 24, 27, 0.80); 
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 32px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 92, 246, 0.1);
    width: 100%; max-width: 550px; overflow: hidden; position: relative;
}

.header {
    text-align: center; padding: 3rem 2rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.header-icon { font-size: 4rem; margin-bottom: 1rem; display: inline-block; transition: var(--transition); }

/* Color Dinámico */
.dyn-hex { transition: all 0.5s ease; color: var(--dynamic-hex); filter: drop-shadow(0 0 15px var(--dynamic-hex)); }

/* SPA Views */
.view-section { display: none; padding: 2.5rem; animation: fadeIn 0.4s ease; }
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Formularios Premium */
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.6rem; font-size: 0.9rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon i { position: absolute; left: 1.2rem; font-size: 1.4rem; color: var(--primary); pointer-events: none;}
.input-with-icon input { padding-left: 3.5rem !important; }

.form-control, .form-select {
    width: 100%; padding: 1.2rem 1.5rem; background-color: var(--bg-elevated);
    border: 2px solid var(--border-color); border-radius: 16px;
    color: var(--text-strong); font-size: 1.05rem; font-family: var(--font-main); transition: var(--transition);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}
.form-control:focus, .form-select:focus { outline: none; border-color: var(--primary); background-color: var(--bg-surface); box-shadow: 0 0 0 4px var(--primary-glow), inset 0 2px 5px rgba(0,0,0,0.1); }
.form-select { 
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a1a1aa' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E"); 
    background-repeat: no-repeat; background-position: right 1.5rem center; padding-right: 3.5rem; 
}

/* Botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 1rem 1.5rem; border-radius: 16px; font-weight: 800;
    font-size: 1rem; cursor: pointer; border: none; transition: var(--transition);
    font-family: var(--font-main); text-transform: uppercase; letter-spacing: 0.05em;
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; border-radius: 10px; width: auto; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #6d28d9); color: white; box-shadow: 0 5px 20px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 30px var(--primary-glow); filter: brightness(1.15); }
.btn-primary:disabled { background: var(--bg-elevated); color: var(--text-muted); box-shadow: none; cursor: not-allowed; transform: none; }

.btn-success { background: linear-gradient(135deg, var(--success), #059669); color: white; box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3); }
.btn-success:hover { transform: translateY(-3px); filter: brightness(1.15); box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4); }
.btn-success:disabled { background: var(--bg-elevated); color: var(--text-muted); box-shadow: none; cursor: not-allowed; }

.btn-outline { background: transparent; border: 2px solid var(--border-color); color: white; }
.btn-outline:hover { border-color: var(--primary); background: rgba(139, 92, 246, 0.1); color: white; }

.btn-danger { background: rgba(244, 63, 94, 0.1); color: var(--danger); border: 1px solid rgba(244, 63, 94, 0.3); }
.btn-danger:hover { background: var(--danger); color: white; box-shadow: 0 5px 20px rgba(244, 63, 94, 0.4); transform: translateY(-3px); }

/* Listas Visuales y Tarjetas */
.header-action { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.header-action h3 { margin: 0; font-size: 1.3rem; color: var(--text-strong); }

.item-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; max-height: 50vh; overflow-y: auto; padding-right: 0.5rem;}
.item-grid::-webkit-scrollbar { width: 6px; }
.item-grid::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }

/* Selección de Juego */
.selection-card {
    position: relative; /* FUNDAMENTAL PARA EL BADGE DE HORARIOS */
    background-color: rgba(255,255,255,0.02); border: 2px solid var(--border-color);
    border-radius: 20px; padding: 1.2rem; display: flex; align-items: center; gap: 1.2rem;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.selection-card:hover { border-color: rgba(6, 182, 212, 0.5); background-color: rgba(6, 182, 212, 0.05); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.selection-card.selected { border-color: var(--secondary); background-color: rgba(6, 182, 212, 0.1); box-shadow: 0 15px 30px var(--secondary-glow); transform: translateY(-3px); }
.selection-card img { width: 70px; height: 70px; border-radius: 14px; object-fit: cover; background: var(--bg-elevated); border: 1px solid var(--border-color); }
.selection-info { display: flex; flex-direction: column; }
.selection-title { font-size: 1.2rem; font-weight: 800; color: white; margin-bottom: 0.3rem; }
.selection-sub { font-size: 0.95rem; color: var(--secondary); font-weight: bold;}

/* Selección de Horario */
.timeslot-pill {
    background-color: rgba(255,255,255,0.02); border: 2px solid var(--border-color);
    border-radius: 16px; padding: 1.2rem; text-align: center; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.timeslot-pill:hover { border-color: var(--primary); background-color: rgba(139, 92, 246, 0.05); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.timeslot-pill.selected { border-color: var(--primary); background-color: rgba(139, 92, 246, 0.15); box-shadow: 0 15px 30px var(--primary-glow); transform: translateY(-3px); }
.timeslot-pill .time { font-size: 1.5rem; font-weight: 900; color: white; }

/* Status y Timers */
.timer-display {
    font-weight: 900; text-align: center;
    font-variant-numeric: tabular-nums; color: white;
    margin: 1rem 0; text-shadow: 0 0 40px var(--primary-glow);
    background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    transition: font-size 0.3s ease, color 0.3s ease;
}

@keyframes pulse-glow { 0% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); } }

/* Spinner */
.loader { border: 4px solid rgba(255,255,255,0.05); border-top-color: var(--primary); border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Modales y Toasts */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); display: none; justify-content: center; align-items: center; z-index: 10000; }
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }
.modal-box { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 32px; padding: 3rem 2.5rem; max-width: 450px; width: 90%; text-align: center; box-shadow: 0 30px 60px -15px rgba(0,0,0,0.8); animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: rgba(24, 24, 27, 0.95); backdrop-filter: blur(15px); border: 1px solid var(--border-color); color: white; padding: 1.2rem 1.5rem; border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.6); display: flex; align-items: center; gap: 1rem; animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; max-width: 350px; pointer-events: auto; }
.toast.error { border-left: 4px solid var(--danger); }
.toast.success { border-left: 4px solid var(--success); }
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOutToast { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); } }

@media (max-width: 480px) {
    .hub-container { border-radius: 24px; }
    .view-section { padding: 1.5rem; }
    #toast-container { left: 15px; right: 15px; top: 15px; }
    .toast { max-width: 100%; }
    .modal-box { padding: 2rem 1.5rem; border-radius: 24px; }
}

/* ANIMACIONES DEL STATUS DE LOS JUEGOS */
@keyframes pulse-green { 
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } 
}
@keyframes pulse-red { 
    0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); } 
    70% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); } 
}