/* ══════════════════════════════════════════════════════════
   EVENTS — /events
   Dressed like the server info and ranking pages: warm gold
   panels, rounded corners and Manrope. One gold voice for every
   event; only the state changes the colour — green while it
   runs, ember while it gets ready.
══════════════════════════════════════════════════════════ */
.ev-main {
    --ev-font: 'Manrope', var(--font-body);
    --ev-gold: #f2c14e;
    --ev-line: rgba(214,160,60,0.30);
    --ev-line-soft: rgba(214,160,60,0.14);
    --ev-panel: linear-gradient(180deg, rgba(44,26,12,0.90) 0%, rgba(24,14,8,0.94) 100%);
    --ev-well: rgba(8,4,2,0.55);
    --ev-text: #e9dcc6;
    --ev-muted: #a8957a;
    padding: 1.5rem 1.5rem 3rem;
    align-items: flex-start;
    font-family: var(--ev-font);
    color: var(--ev-text);
}

.ev-main [hidden] { display: none !important; }

.ev-wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

/* Colour of a card or of the header panel, by state */
.ev-card,
.ev-next {
    --c:  var(--ev-gold);
    --cr: 242,193,78;
}

.ev-card.is-running,
.ev-next.is-running {
    --c:  #3ddc84;
    --cr: 61,220,132;
}

.ev-card.is-preparing,
.ev-next.is-preparing {
    --c:  #f59a4a;
    --cr: 245,154,74;
}

/* ═══════════════════════════════
   HEADER
═══════════════════════════════ */
.ev-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 2rem;
    align-items: center;
    padding: 2rem 2.25rem;
    margin-bottom: 1.25rem;
    border-radius: 22px;
    border: 1px solid var(--ev-line);
    background:
        linear-gradient(90deg, rgba(20,11,5,0.96) 0%, rgba(20,11,5,0.84) 45%, rgba(20,11,5,0.40) 100%),
        url('/images/hero-bg.png') center 70% / cover no-repeat,
        #1a0f07;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,220,150,0.08);
}

.ev-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--ev-line);
    background: rgba(242,193,78,0.10);
    color: var(--ev-gold);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ev-hero-title {
    margin: 0.75rem 0 0.4rem;
    font-family: var(--ev-font);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.5px;
    text-align: left;
    text-transform: uppercase;
    color: var(--text-bright);
}

.ev-hero-lead { margin: 0 0 1.1rem; max-width: 520px; font-size: 0.98rem; line-height: 1.6; color: #d8c8ae; }

.ev-hero-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.ev-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--ev-line-soft);
    background: rgba(12,7,3,0.65);
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ev-chip i { color: var(--ev-gold); }

.ev-chip-live {
    border-color: rgba(61,220,132,0.45);
    background: rgba(61,220,132,0.12);
    color: #8ff0b6;
}

.ev-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ddc84;
    box-shadow: 0 0 10px rgba(61,220,132,0.9);
    animation: ev-pulse 1.6s ease-in-out infinite;
}

/* ── Next event ── */
.ev-next {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.2rem 1.35rem 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(var(--cr), 0.45);
    background:
        radial-gradient(ellipse 80% 90% at 100% 0%, rgba(var(--cr), 0.16) 0%, transparent 70%),
        rgba(12,7,3,0.78);
    backdrop-filter: blur(6px);
    box-shadow: 0 0 30px rgba(var(--cr), 0.12);
}

.ev-next-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--c);
}

/* ── Coming up: the next three events ── */
.ev-up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }

.ev-up {
    --c:  var(--ev-gold);
    --cr: 242,193,78;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(var(--cr), 0.22);
    background: rgba(8,4,2,0.55);
}

.ev-up.is-running   { --c: #3ddc84; --cr: 61,220,132; background: rgba(61,220,132,0.08); }
.ev-up.is-preparing { --c: #f59a4a; --cr: 245,154,74; }

.ev-up:first-child { border-color: rgba(var(--cr), 0.55); box-shadow: 0 0 18px rgba(var(--cr), 0.10); }

.ev-up-names { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ev-up-names strong { color: var(--text-bright); font-size: 0.92rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-up-names span { color: var(--ev-muted); font-size: 0.74rem; }
.ev-up .ev-count { font-size: 1.3rem; }
.ev-up:first-child .ev-count { font-size: 1.55rem; }

/* The event icon: a medallion in the state's colour */
.ev-medal {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(var(--cr), 0.35) 0%, rgba(20,11,5,0.95) 75%);
    border: 1px solid rgba(var(--cr), 0.55);
    color: var(--c);
    font-size: 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255,220,150,0.18), 0 4px 12px rgba(0,0,0,0.4);
}

.ev-medal-sm { width: 34px; height: 34px; font-size: 0.85rem; }

/* ═══════════════════════════════
   TOOLBAR (title + list / cards)
═══════════════════════════════ */
.ev-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.ev-toolbar-title {
    margin: 0;
    font-family: var(--ev-font);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-align: left;
    text-transform: none;
    color: var(--text-bright);
}

.ev-views {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid var(--ev-line-soft);
    background: var(--ev-well);
}

/* The site-wide button look (red sweep, spaced capitals) is for call-to-action buttons. */
.ev-main .ev-view-btn {
    width: auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border: none;
    border-radius: 9px;
    background: none;
    box-shadow: none;
    color: var(--ev-muted);
    font-family: var(--ev-font);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ev-main .ev-view-btn::before { display: none; }
.ev-main .ev-view-btn:hover { color: var(--ev-text); box-shadow: none; }
.ev-main .ev-view-btn.is-active { background: rgba(242,193,78,0.16); color: var(--ev-gold); }

/* ═══════════════════════════════
   LIST VIEW
═══════════════════════════════ */
.ev-list {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--ev-line-soft);
    background: var(--ev-panel);
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

.ev-row {
    --c:  var(--ev-gold);
    --cr: 242,193,78;
    display: grid;
    grid-template-columns: minmax(200px, 1.3fr) 130px minmax(170px, 0.9fr) minmax(0, 2fr);
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--ev-line-soft);
    border-left: 3px solid transparent;
    transition: background 0.2s;
}

.ev-row:hover:not(.ev-row-head) { background: rgba(242,193,78,0.04); }

.ev-row.is-running {
    --c:  #3ddc84;
    --cr: 61,220,132;
    border-left-color: #3ddc84;
    background: linear-gradient(90deg, rgba(61,220,132,0.12), rgba(61,220,132,0.02) 60%);
}

.ev-row.is-preparing { --c: #f59a4a; --cr: 245,154,74; border-left-color: #f59a4a; }

.ev-row-head {
    border-top: none;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    background: rgba(8,4,2,0.45);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ev-muted);
}

.ev-row-event { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.ev-row-name { color: var(--text-bright); font-size: 0.98rem; font-weight: 800; }
.ev-row .ev-card-kind { font-size: 0.62rem; }
.ev-row-count { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.ev-row .ev-count { font-size: 1.45rem; }
.ev-row .ev-times { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.ev-row .ev-time { flex: none; padding: 0.25rem 0.55rem; font-size: 0.76rem; }

/* ═══════════════════════════════
   CARDS
═══════════════════════════════ */
.ev-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.ev-card {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    padding: 1.3rem 1.4rem 1.35rem;
    border-radius: 18px;
    border: 1px solid var(--ev-line-soft);
    background: var(--ev-panel);
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.ev-card:hover {
    border-color: rgba(var(--cr), 0.45);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(var(--cr), 0.08);
}

.ev-card.is-running {
    border-color: rgba(61,220,132,0.5);
    background:
        radial-gradient(ellipse 70% 80% at 100% 0%, rgba(61,220,132,0.14) 0%, transparent 70%),
        linear-gradient(180deg, rgba(16,30,20,0.94) 0%, rgba(10,16,12,0.96) 100%);
    box-shadow: 0 0 30px rgba(61,220,132,0.16), 0 14px 34px rgba(0,0,0,0.35);
}

.ev-card.is-preparing { border-color: rgba(245,154,74,0.4); }

.ev-card-head { display: flex; align-items: center; gap: 0.9rem; }
.ev-card-names { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.ev-card-name {
    margin: 0;
    font-family: var(--ev-font);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-align: left;
    text-transform: none;
    color: var(--text-bright);
}

.ev-card-kind {
    margin-top: 0.1rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ev-muted);
}

.ev-status {
    flex: none;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--cr), 0.55);
    background: rgba(var(--cr), 0.10);
    color: var(--c);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.ev-card-desc { margin: 0; font-size: 0.86rem; line-height: 1.55; color: #cbbba0; }

/* ── Countdown ── */
.ev-count-box {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--ev-line-soft);
    background: var(--ev-well);
}

.ev-count-label {
    flex-basis: 100%;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ev-muted);
}

.ev-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ev-font);
    font-size: 2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: var(--c);
    text-shadow: 0 0 22px rgba(var(--cr), 0.4);
}

.ev-count .ev-live-dot { width: 0.4em; height: 0.4em; }
.ev-count-at { font-size: 0.8rem; color: var(--ev-muted); }

/* ── Times today ── */
.ev-times-label {
    margin-bottom: -0.4rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ev-muted);
}

.ev-times { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.ev-time {
    padding: 0.32rem 0.65rem;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.025);
    color: #b3a58f;
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ev-time.is-next {
    border-color: rgba(var(--cr), 0.6);
    background: rgba(var(--cr), 0.14);
    color: var(--c);
    box-shadow: 0 0 12px rgba(var(--cr), 0.15);
}

.ev-times-none { font-size: 0.82rem; color: var(--ev-muted); }

/* ── Empty / error / footnote ── */
.ev-state {
    grid-column: 1 / -1;
    padding: 3rem 1rem;
    border-radius: 18px;
    border: 1px dashed var(--ev-line-soft);
    text-align: center;
    color: var(--ev-muted);
    font-size: 0.9rem;
}

.ev-state i { margin-right: 0.4rem; color: var(--ev-gold); }
.ev-state.is-error { color: #ff7a6b; }

.ev-footnote {
    margin-top: 1.4rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--ev-muted);
}

@keyframes ev-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ═══════════════════════════════
   NARROW SCREENS
═══════════════════════════════ */
@media (max-width: 1080px) {
    .ev-row { grid-template-columns: minmax(180px, 1fr) 120px minmax(160px, 1fr); }
    .ev-row-times { grid-column: 1 / -1; }
    .ev-row-head span:last-child { display: none; }
}

@media (max-width: 900px) {
    .ev-hero { grid-template-columns: minmax(0, 1fr); padding: 1.6rem 1.4rem; }
    .ev-next { max-width: 460px; min-width: 0; }
    .ev-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ev-row-head { display: none; }
    .ev-row { grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem 0.8rem; padding: 0.85rem 1rem; }
    .ev-row-status { justify-self: end; }
    .ev-row-count { grid-column: 1 / -1; }
    .ev-view-btn span { display: none; }
    .ev-hero { padding: 1.3rem 1rem; }
    .ev-next { padding: 1rem 0.85rem; }
    .ev-up { padding: 0.5rem 0.6rem; gap: 0.6rem; }
    .ev-next .ev-up .ev-count { font-size: 1.15rem; }
}

@media (max-width: 560px) {
    .ev-main { padding: 1rem 1rem 2.5rem; }
    .ev-card { padding: 1.1rem 1.1rem 1.2rem; }
    .ev-count { font-size: 1.7rem; }
}
