/* ═══════════════════════════════════════════════════
   DION PRIVATE SERVER – wars.css
   Registro Oficial das Guerras do Reino
═══════════════════════════════════════════════════ */

/* ─── HERO SECTION ─── */
#wars-hero {
    position: relative;
    min-height: 75vh;
    padding-top: calc(var(--header-h) + 34px + 4rem);
    padding-bottom: 6rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.wars-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background: 
        radial-gradient(ellipse at 50% 30%, rgba(111, 44, 255, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, var(--obsidian) 0%, transparent 70%),
        linear-gradient(180deg, rgba(9, 9, 9, 0.7) 0%, var(--obsidian) 100%);
}

.wars-hero-bg::before {
    content: '';
    position: absolute; inset: 0;
    background: url('background_dion.png') center/cover no-repeat;
    opacity: 0.2;
    filter: sepia(0.5) brightness(0.6) contrast(1.2);
}

.wars-hero-fog {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(255, 44, 44, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(111, 44, 255, 0.06) 0%, transparent 45%);
    animation: fog-drift 25s ease-in-out infinite alternate;
}

/* Decorativos de Guerra */
.war-decor {
    position: absolute; top: 15%; width: 150px; height: 400px;
    z-index: 2; opacity: 0.3; pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.8));
}
.war-decor-left {
    left: 2%; transform: rotate(-8deg);
    background: linear-gradient(180deg, #331111, transparent);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
    border-left: 2px solid rgba(255, 0, 0, 0.2);
}
.war-decor-right {
    right: 2%; transform: rotate(8deg);
    background: linear-gradient(180deg, #111133, transparent);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
    border-right: 2px solid rgba(0, 0, 255, 0.2);
}

.wars-hero-inner { position: relative; z-index: 5; text-align: center; }

.wars-hero-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: 10px;
    background: linear-gradient(180deg, #fff 0%, #ff4444 40%, #880000 70%, #330000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 50px rgba(255, 0, 0, 0.3));
    line-height: 0.9;
    margin-bottom: 1.5rem;
}

.wars-hero-sub {
    font-family: 'IM Fell English', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-dim);
    max-width: 700px;
    margin: 0 auto 3.5rem;
    line-height: 1.8;
}

.wars-hero-btns {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* ─── OVERVIEW CARDS ─── */
#wars-overview {
    padding: 5rem 2rem;
    background: linear-gradient(180deg, var(--obsidian), var(--stone));
    position: relative; z-index: 10;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.ov-card {
    background: linear-gradient(160deg, rgba(25, 15, 30, 0.95), rgba(10, 10, 15, 0.98));
    border: 1px solid var(--border);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.ov-card:hover {
    border-color: var(--arcane);
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.6), 0 0 25px rgba(111, 44, 255, 0.15);
}

.ov-icon { font-size: 2.5rem; margin-bottom: 1rem; filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4)); }
.ov-label {
    font-family: 'Cinzel', serif; font-size: 0.6rem; letter-spacing: 3px;
    text-transform: uppercase; color: var(--text-dark); margin-bottom: 1.25rem;
}
.ov-val {
    font-family: 'Cinzel Decorative', serif; font-size: 2rem;
    color: var(--gold-light); line-height: 1; margin-bottom: 0.5rem;
}
.ov-sub {
    font-family: 'Cinzel', serif; font-size: 0.6rem; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--text-dark); font-style: italic;
}

/* ─── FILTROS ─── */
#wars-filters {
    padding: 4rem 2rem;
    background: var(--stone2);
    position: relative; z-index: 10;
}

.wfilters {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}
.wf-group { display: flex; flex-direction: column; gap: 0.6rem; }
.wf-search { flex: 2; min-width: 300px; }
.wf-label {
    font-family: 'Cinzel', serif; font-size: 0.6rem; letter-spacing: 2.5px;
    text-transform: uppercase; color: var(--text-dark);
}
.wf-search-inner { display: flex; gap: 0.5rem; }
.wf-input {
    flex: 1; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border2);
    color: var(--text); font-family: 'Cinzel', serif; font-size: 0.85rem;
    padding: 1rem 1.5rem; outline: none; transition: all 0.3s;
}
.wf-input:focus {
    border-color: var(--arcane); background: rgba(111, 44, 255, 0.05);
    box-shadow: 0 0 20px rgba(111, 44, 255, 0.15);
}
.wf-btn-search {
    background: linear-gradient(135deg, var(--arcane-dark), var(--arcane));
    color: #fff; border: 1px solid rgba(111, 44, 255, 0.4); padding: 0 1.5rem;
    cursor: pointer; transition: all 0.3s;
}

.wf-select-wrap { position: relative; }
.wf-select {
    appearance: none; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border2);
    color: var(--text); font-family: 'Cinzel', serif; font-size: 0.8rem;
    padding: 1rem 3rem 1rem 1.5rem; outline: none; cursor: pointer; min-width: 200px;
}
.wf-select-arrow {
    position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
    color: var(--gold); pointer-events: none;
}

/* ─── ACTIVE WARS GRID ─── */
#active-wars {
    padding: 6rem 2rem;
    background: var(--obsidian);
    position: relative;
}

.wars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.war-card {
    background: linear-gradient(180deg, #1a0f0f, #0a0a0a);
    border: 1px solid rgba(255, 68, 68, 0.2);
    position: relative;
    padding: 2.5rem;
    overflow: hidden;
    transition: all 0.4s ease;
}
.war-card:hover {
    border-color: rgba(255, 68, 68, 0.5);
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(255, 0, 0, 0.1);
}

.war-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.war-guild-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex: 1;
}
.war-crest {
    width: 70px; height: 70px;
    background: #111;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}
.war-guild-name {
    font-family: 'Cinzel', serif; font-size: 0.9rem; font-weight: 700;
    color: var(--text); text-transform: uppercase; letter-spacing: 1px;
}

.war-vs {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    padding: 0 1rem;
    font-style: italic;
}

.war-card-body { position: relative; z-index: 2; text-align: center; }

.war-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.score-val {
    font-family: 'Cinzel Decorative', serif;
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
.score-sep { font-size: 2rem; color: var(--text-dark); }

.war-progress-wrap { margin-bottom: 2rem; }
.war-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff8888);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
    transition: width 1s ease-in-out;
}

.war-status-label {
    font-family: 'Cinzel', serif; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-dim);
}
.war-status-label strong { color: var(--gold); }

.war-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.wmeta-item { display: flex; flex-direction: column; gap: 0.3rem; }
.wmeta-label {
    font-family: 'Cinzel', serif; font-size: 0.55rem;
    text-transform: uppercase; color: var(--text-dark); letter-spacing: 1.5px;
}
.wmeta-val {
    font-family: 'Cinzel', serif; font-size: 0.8rem;
    color: var(--text-dim); font-weight: 600;
}

.war-card-footer { margin-top: 2.5rem; position: relative; z-index: 2; }
.btn-war-details {
    width: 100%;
    background: rgba(255, 68, 68, 0.05);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff8888;
    padding: 1rem;
    font-family: 'Cinzel', serif; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    cursor: pointer; transition: all 0.3s;
}
.btn-war-details:hover {
    background: #ff4444; color: #fff;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.4);
}

.war-glow {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, var(--glow-color, rgba(255, 0, 0, 0.15)), transparent 70%);
    opacity: 0.5; pointer-events: none;
    animation: war-pulse 4s infinite alternate;
}

@keyframes war-pulse {
    from { opacity: 0.3; transform: scale(0.95); }
    to { opacity: 0.6; transform: scale(1.05); }
}

/* ─── HISTORY WARS ─── */
#old-wars {
    padding: 6rem 2rem;
    background: var(--stone);
}

.wars-grid-history {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto 4rem;
}

.history-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    transition: all 0.3s;
}
.history-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--gold-dark);
}

.hcard-winner, .hcard-loser { flex: 1; }
.hcard-label {
    display: block; font-family: 'Cinzel', serif; font-size: 0.5rem;
    text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem;
    letter-spacing: 2px;
}
.hcard-guild { display: flex; align-items: center; gap: 1rem; }
.hcard-crest { font-size: 1.5rem; }
.hcard-name {
    font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 700;
    color: var(--text);
}

.hcard-vs {
    font-family: 'IM Fell English', serif; font-style: italic;
    color: var(--text-dark); font-size: 0.9rem;
}

.hcard-stats {
    display: flex; align-items: center; gap: 1rem;
    font-family: 'Cinzel', serif; font-size: 0.7rem; color: var(--text-dim);
}
.hstat strong { color: var(--text); }
.hstat-sep { color: var(--border); }

.btn-history {
    background: none; border: 1px solid var(--border2);
    color: var(--text-dim); padding: 0.6rem 1.2rem;
    font-family: 'Cinzel', serif; font-size: 0.65rem;
    text-transform: uppercase; cursor: pointer; transition: all 0.3s;
}
.btn-history:hover { color: var(--gold); border-color: var(--gold); }

.history-more { text-align: center; }

/* ─── GUIDE SECTION ─── */
#war-guide { padding: 6rem 2rem; background: var(--obsidian); }
.guide-container {
    max-width: 1000px; margin: 0 auto;
    background: linear-gradient(135deg, #111, #080808);
    border: 1px solid var(--border);
    padding: 4rem;
    display: flex; gap: 4rem;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.guide-container::before {
    content: ''; position: absolute; inset: 0;
    background: url('background_dion.png') center/cover no-repeat;
    opacity: 0.05; pointer-events: none;
}

.guide-visual {
    flex-shrink: 0; text-align: center;
}
.guide-icon {
    font-size: 5rem; margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
}
.guide-runes {
    font-family: serif; color: var(--text-dark);
    letter-spacing: 5px; font-size: 0.8rem;
}

.guide-content { flex: 1; }
.guide-title {
    font-family: 'Cinzel Decorative', serif; font-size: 2.2rem;
    color: var(--gold-light); margin: 0.5rem 0 1.5rem;
}
.guide-text {
    font-family: 'IM Fell English', serif; font-size: 1.1rem;
    line-height: 1.8; color: var(--text-dim); margin-bottom: 2rem;
}
.guide-text strong { color: var(--gold); }

.guide-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.rule-item { display: flex; gap: 1rem; align-items: flex-start; }
.rule-bullet { color: var(--arcane); font-size: 0.8rem; margin-top: 0.3rem; }
.rule-item p { font-family: 'Cinzel', serif; font-size: 0.7rem; color: var(--text-dark); text-transform: uppercase; letter-spacing: 1px; }

/* ─── RESPONSIVIDADE ─── */
@media (max-width: 1024px) {
    .wars-grid { grid-template-columns: 1fr; }
    .history-card { flex-direction: column; text-align: center; padding: 2.5rem; }
    .hcard-guild { justify-content: center; }
    .hcard-stats { flex-wrap: wrap; justify-content: center; }
    .guide-container { flex-direction: column; padding: 3rem; text-align: center; }
    .guide-rules { grid-template-columns: 1fr; text-align: left; }
}

@media (max-width: 768px) {
    #wars-hero { min-height: 60vh; padding-top: calc(var(--header-h) + 2rem); }
    .wars-hero-title { font-size: 4rem; }
    .wfilters { flex-direction: column; align-items: stretch; }
    .wf-search { min-width: unset; }
    .wf-select { width: 100%; }
    .war-card { padding: 1.5rem; }
    .score-val { font-size: 2.2rem; }
    .war-meta { grid-template-columns: 1fr; gap: 1rem; }
}
