/* ==========================================================================
   Events page — live timer board, floating glass panel
   ========================================================================== */

.ev-wrap {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 18px 70px;
    box-sizing: border-box;
}

.ev-hero { text-align: center; margin-bottom: 30px; }
.ev-hero h1 {
    font-family: 'Cinzel Decorative', 'Cairo', serif;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--op-accent-2, #dfb76c);
    text-shadow: 0 0 22px rgba(223,183,108,.45), 0 4px 12px rgba(0,0,0,.85);
    margin: 0 0 8px;
}
.ev-hero p {
    font-family: 'Cairo', sans-serif;
    font-size: 14.5px;
    color: #b3a286;
    font-weight: 600;
    margin: 0;
}

.ev-panel {
    border-radius: 20px;
    background: linear-gradient(155deg, rgba(20,18,18,.82) 0%, rgba(6,6,6,.92) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(223,183,108,.26);
    box-shadow: 0 20px 46px rgba(0,0,0,.7), 0 0 30px rgba(223,183,108,.07);
    padding: 30px 24px 26px;
    position: relative;
    overflow: hidden;
}
.ev-panel::before {
    content: '';
    position: absolute;
    inset-inline: 0; top: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--op-accent-2, #dfb76c), transparent);
    background-size: 200% 100%;
    animation: evSweep 4s linear infinite;
}
@keyframes evSweep { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ───────────────────────────────────────────── main clock */
.ev-clock {
    position: relative;
    text-align: center;
    padding: 26px 20px;
    margin-bottom: 26px;
    border-radius: 14px;
    background: rgba(223,183,108,.04);
    border: 1px dashed rgba(223,183,108,.4);
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.ev-clock.live {
    background: rgba(38,222,129,.09) !important;
    border-color: var(--op-success, #26de81) !important;
    box-shadow: 0 0 26px rgba(38,222,129,.16);
}
.ev-clock.danger {
    background: rgba(255,71,87,.18) !important;
    border-color: var(--op-danger, #ff3344) !important;
    animation: evPanic .42s infinite alternate;
}
.ev-clock.boom {
    background: rgba(255,165,2,.26) !important;
    border-color: #ffa502 !important;
    animation: evShake .15s infinite;
}
@keyframes evPanic {
    0%   { box-shadow: 0 0 14px rgba(255,71,87,.6); transform: scale(1); }
    100% { box-shadow: 0 0 40px rgba(255,71,87,.9), inset 0 0 20px rgba(255,71,87,.5); transform: scale(1.008); }
}
@keyframes evShake {
    0%   { transform: translate(3px,3px) rotate(0); }
    20%  { transform: translate(-3px,-2px) rotate(-1deg); }
    40%  { transform: translate(-2px,3px) rotate(1deg); }
    60%  { transform: translate(3px,1px) rotate(0); }
    80%  { transform: translate(-1px,-3px) rotate(-1deg); }
    100% { transform: translate(1px,2px) rotate(1deg); }
}

.ev-clock .status {
    font-family: 'Cinzel Decorative', 'Cairo', serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c9c0b0;
    margin-bottom: 8px;
}
.ev-clock .digits {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 52px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 3px;
    color: var(--op-success, #26de81);
    text-shadow: 0 0 18px rgba(38,222,129,.5);
}
.ev-clock .name {
    font-family: 'Cinzel Decorative', 'Cairo', serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--op-accent-2, #dfb76c);
    margin-top: 10px;
}

/* ───────────────────────────────────────────── table */
.ev-scroll { overflow-x: auto; border-radius: 12px; }

.ev-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    min-width: 780px;
}
.ev-table th {
    font-family: 'Cinzel Decorative', 'Cairo', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 13px 12px;
    color: #17120a;
    background: linear-gradient(180deg, #f0d69a 0%, var(--op-accent-2, #dfb76c) 100%);
    white-space: nowrap;
}
.ev-table th:first-child { border-start-start-radius: 9px; }
.ev-table th:last-child  { border-start-end-radius: 9px; }

.ev-table td {
    padding: 13px 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    text-align: center;
    border-bottom: 1px solid rgba(223,183,108,.13);
}
.ev-table tbody tr { background: rgba(0,0,0,.32); transition: background .25s ease; }
.ev-table tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.ev-table tbody tr:hover { background: rgba(223,183,108,.1); }

.ev-table .ev-name { color: var(--op-accent-2, #dfb76c); font-weight: 700; text-align: start; }
.ev-table .ev-day { color: rgba(255,255,255,.6); }
.ev-table .ev-reward { color: #f1c40f; font-weight: 700; }
.ev-table .ev-time {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12.5px;
    letter-spacing: .5px;
    color: rgba(255,255,255,.72);
    white-space: nowrap;
}
.ev-table .ev-timer {
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    color: var(--op-accent-2, #dfb76c);
    letter-spacing: 1px;
}

.ev-badge {
    display: inline-block;
    min-width: 92px;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: 'Cinzel Decorative', 'Cairo', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}
.ev-badge.upcoming { background: rgba(38,222,129,.18); border: 1px solid var(--op-success, #26de81); color: var(--op-success, #26de81); }
.ev-badge.live     { background: var(--op-success, #26de81); box-shadow: 0 0 14px rgba(38,222,129,.5); animation: evPulse 1.5s infinite; }
.ev-badge.danger   { background: var(--op-danger, #ff3344); box-shadow: 0 0 18px rgba(255,71,87,.7); animation: evPulse .38s infinite; }
.ev-badge.ended    { background: #ffa502; }
.ev-badge.offline  { background: #4a5259; opacity: .65; }
@keyframes evPulse { 0%,100% { opacity: .72; } 50% { opacity: 1; } }

.ev-empty {
    text-align: center;
    padding: 40px 20px;
    font-family: 'Cairo', sans-serif;
    color: rgba(255,255,255,.4);
    font-size: 13px;
}

/* ───────────────────────────────────────────── toast */
.ev-toast {
    position: fixed;
    top: 22px;
    inset-inline-end: -420px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 330px;
    max-width: calc(100vw - 30px);
    padding: 15px 20px;
    border-radius: 14px;
    background: linear-gradient(140deg, #1c0505 0%, #0a0a0a 100%);
    border: 1px solid var(--op-danger, #ff3344);
    box-shadow: 0 0 30px rgba(255,71,87,.45);
    color: #fff;
    transition: inset-inline-end .4s ease-in-out;
}
.ev-toast.show { inset-inline-end: 22px; }
.ev-toast i.ico { font-size: 26px; color: var(--op-danger, #ff3344); animation: evPulse .5s infinite; }
.ev-toast .t-title { font-family: 'Cinzel Decorative', 'Cairo', serif; font-weight: 700; font-size: 14px; color: var(--op-danger, #ff3344); letter-spacing: 1px; text-transform: uppercase; }
.ev-toast .t-body { font-family: 'Cairo', sans-serif; font-size: 12.5px; color: rgba(255,255,255,.75); margin-top: 3px; }
.ev-toast .t-count {
    display: block;
    margin-top: 6px;
    font-family: 'Consolas', monospace;
    font-weight: 700;
    font-size: 16px;
    color: var(--op-danger, #ff3344);
}

/* ───────────────────────────────────────────── legend */
.ev-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(223,183,108,.12);
}
.ev-legend div {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'Cairo', sans-serif;
    font-size: 11.5px;
    color: rgba(255,255,255,.45);
}

@media (max-width: 900px) {
    .ev-wrap { padding: 20px 12px 46px; }
    .ev-hero h1 { font-size: 20px; letter-spacing: 1.2px; }
    .ev-panel { padding: 20px 12px 18px; border-radius: 14px; }
    .ev-clock { padding: 18px 12px; }
    .ev-clock .digits { font-size: 32px; letter-spacing: 1.5px; }
    .ev-toast { inset-inline: 10px; min-width: 0; }
    .ev-toast.show { inset-inline: 10px; }
}
