/* ═══════════════════════════════════════════════════════════
 * events.css — Sistema de eventos especiais (tier rewards)
 * ═══════════════════════════════════════════════════════════
 * Depende das CSS variables de game.css: --bg, --bg-panel,
 * --border, --bored, --green, --pink, --cyan.
 *
 * Usado em: game.html (widget compacto) e poe-event.html
 * (página completa: event-list + tasks + tiers).
 * ═══════════════════════════════════════════════════════════ */

/* ── SLIDES DE EVENTO NO CARROSSEL (game.html) ── */
.promo-slide-sale-timer {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 3;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 900;
    color: #000;
    background: var(--bored);
    padding: 4px 9px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.promo-slide-event {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px 12px;
}
.promo-slide-event::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.1) 100%);
}
.promo-slide-event-badge {
    position: absolute;
    top: 8px; left: 10px;
}
.promo-slide-event-bottom {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.promo-slide-event-name {
    font-family: 'Pixel', sans-serif;
    font-size: 15px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,.8);
}
.promo-slide-event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,.6);
}
.promo-slide-claim {
    margin-top: 2px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #000;
    background: var(--bored);
    border-radius: 5px;
    padding: 5px;
}
.ev-card-mini-timer { font-weight: 700; color: var(--bored); }

/* ── BADGE "NEW" (reaproveitado no widget e na página) ── */
.ev-badge {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #04140a;
    background: var(--green);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ── PÁGINA COMPLETA (poe-event.html) ── */
#poe-wrap {
    max-width: 1330px;
    margin: 0 auto;
    padding: 32px 16px 60px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

#poe-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255,255,255,.35);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
}

/* Event-list (cards grandes, igual ao mockup) */
.ev-list {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1100px) { .ev-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .ev-list { grid-template-columns: 1fr; } }

.ev-card {
    background: var(--bg-nav);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s;
}
.ev-card.ev-card-active { border-color: rgba(191,197,0,.45); }

.ev-card-banner {
    height: 92px;
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ev-card-banner::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.8) 100%);
}
.ev-card-banner > * { position: relative; }
.ev-card-name {
    font-family: 'Pixel', sans-serif;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.9);
}

.ev-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.ev-card-feat-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: 2px;
}
.ev-feat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: rgba(255,255,255,.7);
}
.ev-feat-label { flex: 0 0 64px; color: rgba(255,255,255,.45); }
.ev-feat-bar { flex: 1; height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.ev-feat-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #8b6dff, #c2a9ff); }
.ev-feat-val { flex: 0 0 26px; text-align: right; color: rgba(255,255,255,.85); }

.ev-card-rewards-link {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    color: var(--cyan, #4dd9ff);
    cursor: pointer;
    background: none; border: none; padding: 0;
    text-align: left;
}

.ev-card-progress-wrap {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ev-card-progress-label {
    display: flex; justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,.5);
}
.ev-card-timer {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--bored);
}
.ev-card-claim-badge {
    margin-top: 6px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #000;
    background: var(--bored);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 0 16px rgba(191,197,0,.4);
    animation: ev-claim-glow 1.4s ease-in-out infinite;
}
@keyframes ev-claim-glow { 0%,100% { box-shadow: 0 0 10px rgba(191,197,0,.3); } 50% { box-shadow: 0 0 20px rgba(191,197,0,.6); } }

/* ── BARRA DE PROGRESSO (mesmo estilo das missões diárias) ──
 * Classes .mi-bar/.mi-bar-fill/.mi-bar-text já existem inline em
 * game.html — replicadas aqui pra funcionar também em poe-event.html. */
.mi-bar { flex:1; height:7px; background:rgba(255,255,255,.08); border-radius:4px; overflow:hidden; }
.mi-bar-fill { height:100%; background:linear-gradient(90deg,var(--bored),#ffe45e); border-radius:4px; transition:width .4s ease; }
.mi-bar-text { flex-shrink:0; font-family:'Share Tech Mono',monospace; font-size:10px; font-weight:700; color:rgba(255,255,255,.45); min-width:60px; text-align:right; }

/* ── TASKS + TIERS (corpo da página, abaixo da event-list) ── */
.ev-detail {
    background: var(--bg-nav);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ev-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bored);
}

.ev-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;          /* ~5-6 tasks visíveis; resto rola */
    overflow-y: auto;
    padding-right: 6px;          /* respiro pra scrollbar não colar nos cards */
}
.ev-task-list::-webkit-scrollbar { width: 4px; }
.ev-task-list::-webkit-scrollbar-track { background: transparent; }
.ev-task-list::-webkit-scrollbar-thumb { background: rgba(197,197,0,.2); border-radius: 2px; }
.ev-task-list { scrollbar-width: thin; scrollbar-color: rgba(197,197,0,.2) transparent; }

.ev-task {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.06);
}
.ev-task.ev-task-done { border-color: rgba(0,255,136,.3); background: rgba(0,255,136,.04); }
.ev-task-check {
    width: 22px; height: 22px; border-radius: 50%;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.2);
    font-size: 12px;
    color: rgba(255,255,255,.2);
}
.ev-task.ev-task-done .ev-task-check {
    background: var(--green);
    border-color: var(--green);
    color: #04140a;
}
.ev-task-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-task-label { font-size: 13px; color: rgba(255,255,255,.85); }
.ev-task-bar-row { display: flex; align-items: center; gap: 8px; }

/* ── TIER PATH — trilha única contínua (igual ao battle pass de referência) ──
 * Um nível por tier, espaçados uniformemente, sentados sobre uma linha
 * horizontal contínua que preenche conforme tiers são desbloqueados. */
.ev-tier-path { display: flex; flex-direction: column; gap: 14px; }
.ev-tier-path-level {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
}
.ev-tier-path-level strong { color: #fff; font-weight: 900; }

.ev-tier-path-track {
    position: relative;
    display: flex;
    justify-content: space-between;
    height: 78px;
    padding: 0 24px;
    overflow-x: auto;
    --tier-edge: 48px;   /* offset do centro do nó das pontas (padding + meia-caixa) */
}
.ev-tier-path-line {
    position: absolute;
    left: var(--tier-edge); right: var(--tier-edge); top: 50%;
    height: 4px;
    transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border-radius: 2px;
}
.ev-tier-path-line-fill {
    position: absolute;
    left: var(--tier-edge); top: 50%;
    height: 4px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, var(--bored), #ffe45e);
    border-radius: 2px;
    transition: width .4s ease;
}
.ev-tier-path-node {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}
.ev-tier-path-node.ev-tier-path-available { cursor: pointer; }

/* Flag/badge com o número da meta (ou progresso "X/Y" pro próximo tier) */
.ev-tier-path-flag {
    position: relative;
    align-self: flex-start;
    margin-left: -6px;
    margin-bottom: -6px;
    display: flex;
    align-items: center;
    gap: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    z-index: 3;
}

.ev-tier-path-flag-text {
    background: rgba(20,22,32,.92);
    border: 1px solid rgba(255,255,255,.12);
    padding: 2px 6px 2px 4px;
    border-radius: 3px 3px 3px 3px;
    font-size: 10px;
    white-space: nowrap;
}

.ev-tier-path-icon-box {
    position: relative;
    width: 60px; height: 48px;
    border-radius: 8px;
    background: #06060a;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    transition: border-color .15s, box-shadow .15s, transform .12s;
}
.ev-tier-path-node.ev-tier-path-available .ev-tier-path-icon-box {
    border-color: var(--bored);
    box-shadow: 0 0 16px rgba(191,197,0,.45);
    animation: ev-tier-node-pulse 1.4s ease-in-out infinite;
}
.ev-tier-path-node.ev-tier-path-available:hover .ev-tier-path-icon-box { transform: scale(1.08); }
@keyframes ev-tier-node-pulse { 0%,100% { box-shadow: 0 0 10px rgba(191,197,0,.3); } 50% { box-shadow: 0 0 20px rgba(191,197,0,.6); } }

.ev-tier-path-claimed-check {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--green);
    color: #04140a;
    font-size: 10px;
    font-weight: 900;
    display: flex; align-items: center; justify-content: center;
}

/* Tooltip simples no hover (nome do reward) */
.ev-tier-path-node[title] { position: relative; }

/* ── MODAL DE REWARD (centro da tela) ── */
#ev-reward-modal {
    position: fixed; inset: 0;
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}
#ev-reward-modal.open { pointer-events: all; opacity: 1; }
.ev-reward-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.ev-reward-panel {
    position: relative;
    width: min(340px, 90vw);
    background: var(--bg-nav);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px 24px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    transform: scale(.92) translateY(8px);
    transition: transform .25s cubic-bezier(.2,.9,.3,1.3);
}
#ev-reward-modal.open .ev-reward-panel { transform: scale(1) translateY(0); }
.ev-reward-icon { font-size: 52px; }
.ev-reward-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--bored);
}
.ev-reward-value {
    font-family: 'Pixel', sans-serif;
    font-size: 30px;
    color: #fff;
}
.ev-reward-close {
    margin-top: 6px;
    padding: 9px 22px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #000;
    background: var(--bored);
}

/* ── MOBILE ── */
@media (max-width: 600px) {
    .ev-card-mini-banner { height: 64px; }
    .ev-detail { padding: 14px; }
    .ev-tier-path-track { padding: 0 16px; height: 66px; --tier-edge: 36px; }  /* 16px padding + 20px meia-caixa */
    .ev-tier-path-icon-box { width: 40px; height: 40px; font-size: 18px; }
    #poe-wrap { padding: 20px 12px 50px; gap: 20px; }
}