/* Events page */
.ev-page {
    width: min(1120px, 100% - 32px);
    margin: 0 auto;
    padding: 140px 0 70px;
    box-sizing: border-box;
}

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

/* ── Hero ── */
.ev-hero {
    text-align: center;
    margin-bottom: 34px;
}

.ev-kicker {
    margin: 0 0 8px;
    color: #4fb3ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.ev-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ev-hero h1 span {
    color: #4fb3ff;
    text-shadow: 0 0 24px rgba(47, 143, 255, 0.55);
}

.ev-lead {
    max-width: 620px;
    margin: 0 auto;
    color: #9aa8bd;
    line-height: 1.6;
}

.ev-reminder-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 0;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 106, 31, 0.3);
    background: rgba(255, 106, 31, 0.08);
    color: #ffb48a;
    font-size: 0.8rem;
    font-weight: 600;
}

.ev-reminder-note svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ── Section headings ── */
.ev-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ev-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #dbe7f7;
}

.ev-section-head .ev-section-title {
    margin: 0;
}

.ev-section-title--muted {
    color: #7f8ea6;
}

.ev-section-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff6a1f;
    box-shadow: 0 0 12px rgba(255, 106, 31, 0.8);
}

.ev-count {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(47, 143, 255, 0.15);
    border: 1px solid rgba(79, 179, 255, 0.35);
    color: #4fb3ff;
    font-size: 0.75rem;
    font-weight: 800;
}

.ev-main-wrap,
.ev-upcoming-wrap,
.ev-past-wrap {
    margin-bottom: 40px;
    animation: evFadeUp 0.45s ease both;
}

@keyframes evFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* ── Shared bits ── */
.ev-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ev-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(47, 143, 255, 0.12);
    border: 1px solid rgba(79, 179, 255, 0.3);
    color: #8cc8ff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ev-tag--main {
    background: linear-gradient(135deg, #ff6a1f, #ff9a3c);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 106, 31, 0.4);
}

.ev-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ev-status--soon {
    background: rgba(255, 255, 255, 0.06);
    color: #dbe7f7;
}

.ev-status--live {
    background: rgba(237, 66, 69, 0.18);
    color: #ff7b7e;
    border: 1px solid rgba(237, 66, 69, 0.45);
}

.ev-status--live i,
.ev-live-banner i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ed4245;
    animation: evPulse 1.4s ease-in-out infinite;
}

@keyframes evPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.7); }
    50% { box-shadow: 0 0 0 6px rgba(237, 66, 69, 0); }
}

.ev-status--cancelled {
    background: rgba(127, 142, 166, 0.16);
    color: #9aa8bd;
    text-decoration: line-through;
}

.ev-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ev-chips:empty {
    display: none;
}

.ev-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #c9d6ea;
    font-size: 0.78rem;
    font-weight: 600;
}

.ev-chip svg {
    width: 14px;
    height: 14px;
    color: #4fb3ff;
    flex-shrink: 0;
}

.ev-chip--reward {
    border-color: rgba(255, 106, 31, 0.3);
    background: rgba(255, 106, 31, 0.08);
    color: #ffc19c;
}

.ev-chip--reward svg {
    color: #ff6a1f;
}

/* ── Art (image or date tile) ── */
@property --ev-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes evSpin {
    to { --ev-angle: 360deg; }
}

@keyframes evFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

@keyframes evHalo {
    0%, 100% { opacity: 0.55; scale: 0.92; }
    50% { opacity: 0.9; scale: 1.05; }
}

@keyframes evTick {
    0% { transform: translateY(-35%); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

@keyframes evCardIn {
    from { opacity: 0; transform: translateY(26px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@keyframes evShineSweep {
    from { transform: translateX(-120%) skewX(-18deg); }
    to { transform: translateX(220%) skewX(-18deg); }
}

/* No isolation / transform here: the picture must blend with the card behind it */
.ev-art {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}

/* Blurred copy of the picture: tints the area around it with its own colours */
.ev-ambient {
    position: absolute;
    inset: -30%;
    width: 160%;
    height: 160%;
    object-fit: cover;
    filter: blur(38px) saturate(1.6);
    opacity: 0.45;
    z-index: -2;
    pointer-events: none;
}

.ev-art-halo {
    position: absolute;
    width: 78%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 179, 255, 0.45) 0%, rgba(255, 106, 31, 0.22) 45%, transparent 70%);
    filter: blur(18px);
    z-index: -1;
    animation: evHalo 4.5s ease-in-out infinite;
    pointer-events: none;
}

/* Screen blending drops black backgrounds, so logos read as transparent PNGs */
.ev-art-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    mix-blend-mode: screen;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), scale 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ev-art-blank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ev-date-chip {
    position: absolute;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 52px;
    padding: 7px 8px 6px;
    border-radius: 14px;
    background: rgba(5, 10, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    line-height: 1;
}

.ev-date-chip b {
    font-size: 1.35rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.ev-date-chip span {
    margin-top: 3px;
    color: #ff9a3c;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.ev-art-month {
    color: #ffb48a;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.ev-art-day {
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 30px rgba(47, 143, 255, 0.7);
}

.ev-art--main .ev-art-day {
    font-size: 6rem;
}

.ev-art--main .ev-art-month {
    font-size: 1.1rem;
}

/* ── Main event ── */
.ev-main {
    position: relative;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    align-items: center;
    isolation: isolate;
    border-radius: 26px;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 0% 50%, rgba(47, 143, 255, 0.16), transparent 60%),
        radial-gradient(80% 80% at 100% 0%, rgba(255, 106, 31, 0.12), transparent 60%),
        linear-gradient(180deg, rgba(9, 17, 34, 0.94) 0%, rgba(5, 9, 20, 0.97) 100%);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.6), 0 0 80px rgba(47, 143, 255, 0.1);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Animated gradient border */
.ev-main::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 1.5px;
    border-radius: inherit;
    background: conic-gradient(from var(--ev-angle), rgba(79, 179, 255, 0.15) 0deg, #4fb3ff 70deg, rgba(79, 179, 255, 0.15) 140deg, rgba(255, 106, 31, 0.15) 200deg, #ff6a1f 260deg, rgba(255, 106, 31, 0.15) 330deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: evSpin 7s linear infinite;
    pointer-events: none;
}

.ev-main:hover {
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 100px rgba(47, 143, 255, 0.18);
}

.ev-main--live::before {
    background: conic-gradient(from var(--ev-angle), rgba(237, 66, 69, 0.2), #ed4245 90deg, rgba(237, 66, 69, 0.2) 180deg, #ff9a3c 270deg, rgba(237, 66, 69, 0.2));
    animation-duration: 3s;
}

.ev-main-backdrop {
    position: absolute;
    inset: -20%;
    width: 140%;
    height: 140%;
    z-index: -2;
    object-fit: cover;
    filter: blur(70px) saturate(1.5);
    opacity: 0.22;
    pointer-events: none;
}

.ev-main-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(ellipse 60% 90% at 18% 50%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 90% at 18% 50%, #000 0%, transparent 75%);
    pointer-events: none;
}

.ev-main-stage {
    position: relative;
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 28px 10px 28px 28px;
}

.ev-main .ev-art {
    width: 100%;
    aspect-ratio: 1;
    overflow: visible;
}

.ev-main .ev-art-img {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), scale 0.5s ease;
    animation: evFloat 5.5s ease-in-out infinite;
}

.ev-main.is-tilting .ev-art-img {
    transition-duration: 0.12s, 0.5s;
}

.ev-main .ev-ambient {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.4;
    filter: blur(45px) saturate(1.8);
}

.ev-main:hover .ev-art-img {
    scale: 1.05;
}

.ev-main-stage .ev-date-chip {
    top: 26px;
    left: 26px;
}

.ev-main-body {
    position: relative;
    padding: 30px 32px 28px 22px;
    display: flex;
    flex-direction: column;
}

.ev-main-title {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: 0.01em;
    background: linear-gradient(100deg, #ffffff 30%, #9fd3ff 65%, #ffb48a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ev-main-date,
.ev-card-date {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #4fb3ff;
    font-weight: 700;
}

.ev-main-date svg,
.ev-card-date svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ev-main-desc {
    margin: 0 0 16px;
    color: #b3c0d4;
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-line;
}

.ev-main-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.ev-main .ev-details-hint {
    align-self: flex-start;
    margin-bottom: 16px;
}

/* ── Clickable events ── */
[data-open-event] {
    cursor: pointer;
}

[data-open-event]:focus-visible {
    outline: 2px solid #4fb3ff;
    outline-offset: 3px;
}

.ev-details-hint {
    color: #4fb3ff;
    font-size: 0.8rem;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

[data-open-event]:hover .ev-details-hint {
    color: #ffffff;
}

.ev-details-hint i {
    display: inline-block;
    font-style: normal;
    transition: transform 0.25s ease;
}

[data-open-event]:hover .ev-details-hint i {
    transform: translateX(4px);
}

.ev-countdown-wrap {
    margin: auto 0 18px;
}

.ev-countdown-label {
    display: block;
    margin-bottom: 8px;
    color: #7f8ea6;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.ev-countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ev-cd-cell {
    position: relative;
    overflow: hidden;
    padding: 11px 6px 9px;
    border-radius: 14px;
    text-align: center;
    background: linear-gradient(180deg, rgba(47, 143, 255, 0.14), rgba(47, 143, 255, 0.03));
    border: 1px solid rgba(79, 179, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ev-cd-cell::before {
    content: "";
    position: absolute;
    inset: 0 18% auto;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, transparent, #4fb3ff, transparent);
}

.ev-cd-cell:last-child::before {
    background: linear-gradient(90deg, transparent, #ff6a1f, transparent);
}

.ev-cd-cell b {
    display: block;
    font-size: 1.65rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    text-shadow: 0 0 18px rgba(79, 179, 255, 0.35);
}

.ev-cd-cell b.is-tick {
    animation: evTick 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ev-cd-cell span {
    color: #7f8ea6;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ev-live-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: auto 0 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(237, 66, 69, 0.12);
    border: 1px solid rgba(237, 66, 69, 0.4);
    color: #ffb3b5;
    font-weight: 700;
}

.ev-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ev-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ev-btn svg {
    width: 16px;
    height: 16px;
}

.ev-btn--primary {
    background: linear-gradient(135deg, #2f8fff, #1159d6);
    box-shadow: 0 8px 22px rgba(47, 143, 255, 0.35);
}

.ev-btn--discord {
    background: linear-gradient(135deg, #5865f2, #4752c4);
    box-shadow: 0 8px 22px rgba(88, 101, 242, 0.35);
}

.ev-btn:hover {
    transform: translateY(-2px);
}

.ev-card-links {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.ev-cal-link--discord {
    color: #9aa6ff;
}

/* ── Upcoming grid ── */
.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.ev-card {
    position: relative;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 19, 38, 0.94) 0%, rgba(5, 9, 20, 0.96) 100%);
    border: 1px solid rgba(90, 160, 255, 0.16);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.4s ease;
}

/* Gradient border that spins in on hover */
.ev-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    padding: 1.5px;
    border-radius: inherit;
    background: conic-gradient(from var(--ev-angle), transparent 0deg, #4fb3ff 80deg, transparent 160deg, #ff6a1f 260deg, transparent 340deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    animation: evSpin 4s linear infinite;
    pointer-events: none;
}

.ev-card:hover {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(47, 143, 255, 0.16);
}

.ev-card:hover::before {
    opacity: 1;
}

.ev-card-media {
    position: relative;
    z-index: 0;
    height: 200px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 60%, rgba(47, 143, 255, 0.18), transparent 65%),
        #070d1c;
}

.ev-card-media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 60px;
    z-index: 2;
    background: linear-gradient(180deg, transparent, rgba(10, 19, 38, 0.94));
    pointer-events: none;
}

.ev-card .ev-art {
    position: absolute;
    inset: 0;
    padding: 16px 16px 10px;
}

.ev-card .ev-art-img {
    position: absolute;
    inset: 14px 16px 12px;
    width: calc(100% - 32px);
    height: calc(100% - 26px);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ev-card:hover .ev-art-img {
    transform: scale(1.08) translateY(-4px);
}

.ev-art-shine {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    z-index: 1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transform: translateX(-120%) skewX(-18deg);
    pointer-events: none;
}

.ev-card:hover .ev-art-shine {
    animation: evShineSweep 0.9s ease;
}

.ev-card-media .ev-date-chip {
    top: 14px;
    left: 14px;
}

.ev-card-status {
    position: absolute;
    top: 16px;
    right: 14px;
    z-index: 3;
}

.ev-card-status .ev-status {
    background: rgba(5, 10, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ev-card-status .ev-status--live {
    background: rgba(237, 66, 69, 0.3);
    border-color: rgba(237, 66, 69, 0.6);
}

.ev-card-body > .ev-tag {
    align-self: flex-start;
    margin-bottom: 10px;
}

.ev-intro .ev-main {
    animation: evCardIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ev-intro .ev-card {
    animation: evCardIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(0.15s + var(--i, 0) * 0.09s);
}

.ev-card--live {
    border-color: rgba(237, 66, 69, 0.45);
}

.ev-card--cancelled {
    opacity: 0.6;
}

.ev-card--cancelled .ev-card-title {
    text-decoration: line-through;
}

.ev-card-body {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 4px 20px 18px;
}

.ev-card-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.22;
    transition: color 0.25s ease;
}

.ev-card:hover .ev-card-title {
    color: #9fd3ff;
}

.ev-card-date {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.ev-card-desc {
    margin: 0 0 12px;
    color: #9aa8bd;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-line;
}

.ev-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ev-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ev-cal-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9aa8bd;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ev-cal-link svg {
    width: 15px;
    height: 15px;
}

.ev-cal-link:hover {
    color: #ffffff;
}

/* ── Past ── */
.ev-past {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ev-past-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #9aa8bd;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ev-past-item:hover {
    background: rgba(47, 143, 255, 0.07);
    border-color: rgba(79, 179, 255, 0.3);
}

.ev-past-item strong {
    flex: 1;
    color: #c9d6ea;
    font-weight: 700;
}

.ev-past-date {
    min-width: 96px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #7f8ea6;
}

/* ── Empty / error / loading ── */
.ev-empty {
    padding: 48px 28px;
    text-align: center;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(9, 17, 34, 0.9) 0%, rgba(5, 9, 20, 0.92) 100%);
    border: 1px dashed rgba(90, 160, 255, 0.3);
}

.ev-empty h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.ev-empty p {
    max-width: 480px;
    margin: 0 auto;
    color: #9aa8bd;
    line-height: 1.6;
}

.ev-empty--error {
    border-color: rgba(237, 66, 69, 0.4);
}

.ev-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #4fb3ff;
    background: rgba(47, 143, 255, 0.12);
}

.ev-empty-icon svg {
    width: 30px;
    height: 30px;
}

.ev-loading {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ev-skel {
    height: 280px;
    border-radius: 18px;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 30%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 70%);
    background-size: 200% 100%;
    animation: evShimmer 1.3s linear infinite;
}

.ev-skel--main {
    height: 360px;
    border-radius: 22px;
}

@keyframes evShimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* ── Mobile ── */
@media (max-width: 860px) {
    .ev-page {
        padding-top: 120px;
    }

    .ev-main {
        grid-template-columns: 1fr;
    }

    .ev-main-stage {
        padding: 26px 20px 0;
    }

    .ev-main .ev-art {
        width: min(240px, 70%);
    }

    .ev-main-stage .ev-date-chip {
        top: 20px;
        left: 20px;
    }

    .ev-main-body {
        padding: 18px 20px 22px;
    }

    .ev-main-grid {
        -webkit-mask-image: radial-gradient(ellipse 90% 50% at 50% 20%, #000 0%, transparent 75%);
        mask-image: radial-gradient(ellipse 90% 50% at 50% 20%, #000 0%, transparent 75%);
    }

    .ev-cd-cell b {
        font-size: 1.45rem;
    }

    .ev-past-item {
        flex-wrap: wrap;
        gap: 6px 12px;
    }
}

/* ── Event details popup ── */
html.ev-modal-open,
html.ev-modal-open body {
    overflow: hidden;
}

.ev-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.ev-modal[hidden] {
    display: none;
}

.ev-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 5, 12, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.ev-modal-dialog {
    position: relative;
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, #0b1528 0%, #060b17 100%);
    border: 1px solid rgba(90, 160, 255, 0.28);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), 0 0 60px rgba(47, 143, 255, 0.12);
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease;
    outline: none;
}

.ev-modal-dialog::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    z-index: 3;
    background: linear-gradient(90deg, #2f8fff, #4fb3ff 40%, #ff6a1f 80%, #ff9a3c);
}

.ev-modal.is-visible .ev-modal-backdrop {
    opacity: 1;
}

.ev-modal.is-visible .ev-modal-dialog {
    opacity: 1;
    transform: none;
}

.ev-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(5, 9, 20, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ev-modal-close svg {
    width: 18px;
    height: 18px;
}

.ev-modal-close:hover {
    background: rgba(237, 66, 69, 0.8);
    transform: rotate(90deg);
}

.ev-modal-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 179, 255, 0.35) transparent;
}

.ev-modal-hero {
    position: relative;
    height: 230px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #0a1428;
}

.ev-modal-hero-bg {
    position: absolute;
    inset: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    object-fit: cover;
    filter: blur(22px) brightness(0.55) saturate(1.3);
}

.ev-modal-hero-img {
    position: relative;
    height: 200px;
    max-width: 80%;
    object-fit: contain;
    mix-blend-mode: screen;
    animation: evFloat 5.5s ease-in-out infinite;
}

.ev-modal-hero::before {
    content: "";
    position: absolute;
    width: 260px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 179, 255, 0.4) 0%, rgba(255, 106, 31, 0.2) 45%, transparent 70%);
    z-index: 1;
    filter: blur(20px);
    animation: evHalo 4.5s ease-in-out infinite;
}

.ev-modal-hero-img {
    z-index: 2;
}

.ev-modal-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 70px;
    background: linear-gradient(180deg, transparent, #0b1528);
}

.ev-modal-hero--blank {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 25% 20%, rgba(47, 143, 255, 0.4), transparent 55%),
        radial-gradient(circle at 80% 80%, rgba(255, 106, 31, 0.3), transparent 55%),
        #0a1428;
}

.ev-modal-hero--blank .ev-art-day {
    font-size: 5rem;
}

.ev-modal-body {
    position: relative;
    padding: 6px 28px 28px;
}

.ev-modal-title {
    margin: 0 0 18px;
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: 0.02em;
}

.ev-modal-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.ev-modal-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(90, 160, 255, 0.16);
}

.ev-modal-tile-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #4fb3ff;
    background: rgba(47, 143, 255, 0.12);
}

.ev-modal-tile-icon svg {
    width: 18px;
    height: 18px;
}

.ev-modal-tile-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ev-modal-tile-text small {
    color: #7f8ea6;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ev-modal-tile-text b {
    color: #e6eefb;
    font-size: 0.92rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ev-modal-tile--reward .ev-modal-tile-icon {
    color: #ffb48a;
    background: rgba(255, 106, 31, 0.14);
}

.ev-modal-body .ev-countdown,
.ev-modal-body .ev-live-banner {
    margin: 0 0 20px;
}

.ev-modal-note {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #9aa8bd;
    font-weight: 700;
}

.ev-modal-note--cancelled {
    color: #ffb3b5;
    background: rgba(237, 66, 69, 0.1);
    border-color: rgba(237, 66, 69, 0.35);
}

.ev-modal-section h3 {
    margin: 0 0 10px;
    color: #7f8ea6;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ev-modal-desc {
    margin: 0 0 22px;
    color: #c3cfe2;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.ev-modal-actions {
    justify-content: center;
    margin: 0 0 20px;
}

@media (max-width: 600px) {
    .ev-modal {
        padding: 0;
        place-items: end center;
    }

    .ev-modal-dialog {
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
        transform: translateY(40px);
    }

    .ev-modal-hero {
        height: 190px;
    }

    .ev-modal-hero-img {
        height: 150px;
    }

    .ev-modal-body {
        padding: 4px 18px 22px;
    }

    .ev-modal-actions .ev-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ev-modal-backdrop,
    .ev-modal-dialog,
    .ev-main .ev-art-img {
        transition: none;
    }

    .ev-main::before,
    .ev-card::before,
    .ev-art-halo,
    .ev-main .ev-art-img,
    .ev-modal-hero::before,
    .ev-modal-hero-img,
    .ev-intro .ev-main,
    .ev-intro .ev-card,
    .ev-cd-cell b.is-tick {
        animation: none;
    }
}
