/* assets/css/style.css — Gamer Dark UI v4 */
:root {
    --bg-main: #0f111a;
    --bg-panel: #1a1d2d;
    --bg-panel-hover: #23273a;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-secondary: #8b5cf6;
    --border-color: #2e334d;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
}

.glow-text {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-text-small {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

/* Layout Split View */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* --- Left Column: Calendar --- */
.calendar-section {
    flex: 5;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-panel);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    transition: color 0.3s;
}

.nav-btn:hover {
    color: var(--accent-primary);
}

.calendar-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.weekday, .days-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.weekday {
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.days-container {
    flex: 1;
    grid-auto-rows: minmax(100px, 1fr);
}

.calendar-day {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.calendar-day.empty {
    background: transparent;
    border-color: transparent;
}

.calendar-day.today {
    border-color: #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Highlight Cell when Event Scheduled */
.calendar-day.has-events {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.calendar-day.has-events:hover {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.7);
    transform: translateY(-2px);
}

.day-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    align-self: flex-end;
}

/* Indicadores de Estado en Celdas */
.cell-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 4px;
    text-align: center;
    word-break: break-word;
    font-family: 'Outfit', sans-serif;
    margin-top: 4px;
}

.cell-status.active-event {
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.cell-status.future-event {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* --- Right Column: Details & Accordion Panel --- */
.details-section {
    flex: 5;
    background: var(--bg-panel);
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    max-height: 100vh;
}

/* Ocultar scrollbar visualmente manteniendo scroll funcional */
.details-section, .events-accordion-wrapper, .accordion-container {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.details-section::-webkit-scrollbar,
.events-accordion-wrapper::-webkit-scrollbar,
.accordion-container::-webkit-scrollbar {
    display: none !important;
}

/* Contenedor Principal de la Lista con Bordes Redondeados */
.events-accordion-wrapper {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: rgba(15, 17, 26, 0.4);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: var(--text-muted);
    text-align: center;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* ─── Accordion UI ────────────────────────────────────── */
.accordion-container {
    display: flex;
    flex-direction: column;
}

.accordion-item {
    background: rgba(15, 17, 26, 0.6);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    outline: none !important;
    box-shadow: none !important;
    transition: background 0.3s;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-item.active {
    background: rgba(26, 29, 45, 0.95);
}

.accordion-header {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(26, 29, 45, 0.8);
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--bg-panel-hover);
}

/* Badge con Índice Numerado [ 1 ] */
.idx-badge {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #60a5fa;
    margin-right: 0.85rem;
    white-space: nowrap;
}

.header-main {
    flex: 1;
}

.header-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.evt-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.evt-period {
    font-size: 0.85rem;
    color: #60a5fa;
    font-weight: 600;
    margin-left: auto;
    white-space: nowrap;
}

.header-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 480px;
}

.header-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s;
    margin-left: 1rem;
}

.accordion-item.active .header-arrow {
    transform: rotate(180deg);
    color: #60a5fa;
}

/* Accordion Body (Enfocado Exclusivamente en Premios/Countdown/Ticket) */
.accordion-body {
    display: none;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-main);
    animation: fadeIn 0.3s ease-out;
}

.accordion-item.active .accordion-body {
    display: block;
}

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

/* Multidía Banner / Countdown */
.multiday-banner {
    margin-bottom: 1.5rem;
}

.banner-status-in-progress {
    color: #10b981;
    font-weight: 800;
    font-size: 0.95rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.countdown-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 0.75rem 1.2rem;
    border-radius: 8px;
    color: #fcd34d;
    font-weight: 700;
}

.countdown-label {
    font-size: 0.9rem;
}

.countdown-timer-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

/* ─── Ticket Style Discount (Blanco Estricto, Sin Resplandor) ─ */
.ticket-discount {
    display: flex;
    background: #ffffff !important;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: none !important;
    filter: none !important;
    border: 1px solid #cbd5e1;
}

.ticket-discount::before, .ticket-discount::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background: var(--bg-main);
    border-radius: 50%;
    transform: translateY(-50%);
}

.ticket-discount::before { left: -9px; }
.ticket-discount::after { right: -9px; }

.ticket-left {
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 2px dashed #cbd5e1;
}

.ticket-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: #0f172a !important;
    line-height: 1;
}

.ticket-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #475569 !important;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.ticket-right {
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.ticket-promo-code {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b !important;
}

.ticket-sub {
    font-size: 0.8rem;
    color: #64748b !important;
}

/* ─── Reward / Prize Cards Grid ───────────────────────── */
.rewards-section {
    margin-top: 1rem;
}

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

.prize-card {
    background: rgba(26, 29, 45, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, background 0.2s;
}

.prize-card:hover {
    transform: translateY(-3px);
    background: rgba(35, 39, 58, 0.95);
}

.prize-header-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fcd34d;
    margin-bottom: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.prize-header-time.two-lines {
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.prize-header-time.two-lines .time-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

.prize-header-time.two-lines .time-value {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fcd34d;
}

.prize-header-time.single-line {
    padding: 4px 6px;
    font-family: 'Outfit', sans-serif;
}

.prize-img-container {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.prize-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.prize-placeholder {
    font-size: 2.2rem;
    opacity: 0.6;
}

.prize-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    word-break: break-word;
}

.prize-qty {
    font-size: 0.8rem;
    font-weight: 700;
    color: #60a5fa;
    font-family: 'Outfit', sans-serif;
}

.prize-period {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Info Box */
.info-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}

.border-accent {
    border-left: 4px solid var(--accent-primary);
}

.info-box h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.info-label { color: var(--text-muted); }
.info-value { font-weight: 600; color: #fff; }

.mt-20 { margin-top: 20px; }

.admin-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.admin-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .app-wrapper {
        flex-direction: column;
    }
    
    .calendar-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}
