/* =========================================================
   Legion Design System — Innova Hub
   Revisão 4.0 — Consolidated Purple Theme
   ========================================================= */
:root {
    --bg-dark: #0a0a12;
    --bg-card: rgba(20, 20, 35, 0.8);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #4c1d95;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-main: 'Roboto', sans-serif;
    --font-display: 'Outfit', sans-serif;
    --transition: all 0.3s ease;

    /* Game theme colors */
    --game-aion: #60a5fa;
    --game-ragnarok: #f59e0b;
    --game-lineage: #c084fc;
    --game-minecraft: #4ade80;
    --game-tibia: #fb923c;
    --game-pw: #22d3ee;
    --game-mu: #f87171;
    --game-wow: #facc15;
    --game-silkroad: #a78bfa;
    --game-cabal: #e879f9;
    --game-samp: #34d399;
    --game-batocera: #94a3b8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* ---- CONTAINER ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- HEADER / NAV ---- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 18, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(to right, #ffffff, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#nav .nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    margin: 0;
    padding: 0;
}

#nav .nav-links li { list-style: none; }

#nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 6px;
    display: inline-block;
    text-transform: none;
}

#nav a:hover { color: var(--primary-light); background: rgba(139,92,246,0.1); }

#nav a.nav-active-link {
    color: var(--primary-light);
    background: rgba(139,92,246,0.1);
    font-weight: 700;
}

.nav-auth-item {
    border-left: 1px solid rgba(255,255,255,0.1);
    padding-left: 1.2rem;
    margin-left: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-greeting { color: var(--primary); font-weight: bold; font-size: 0.9rem; }

.logout-btn { color: #f87171 !important; font-size: 0.85rem !important; margin-left: 6px; }

.login-btn {
    color: #fff !important;
    font-weight: bold !important;
    background: rgba(139,92,246,0.2) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 8px !important;
    border: 1px solid rgba(139,92,246,0.4) !important;
}

.login-btn:hover { background: rgba(139,92,246,0.4) !important; }

/* Mobile Menu */
#mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* ---- HERO ---- */
#banner {
    position: relative;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

/* ---- BUTTONS ---- */
.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.button.alt {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-main);
}

.button.alt:hover {
    background: rgba(255,255,255,0.1);
}

/* ---- SECTIONS ---- */
.wrapper { padding: 4rem 0; }
.wrapper.style2 { background: #11111a; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover { transform: translateY(-5px); }

/* ---- DYNAMIC GRID ---- */
.dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* ---- MARQUEE / GAMES BAR ---- */
.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}
.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}
.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.games-bar-item {
    display: inline-flex;
    align-items: center;
    margin: 0 4rem;
    transition: all 0.3s ease;
    opacity: 0.6;
    cursor: default;
}
.games-bar-item:hover { opacity: 1; transform: scale(1.05); }

/* ---- ZIGZAG ---- */
.zigzag-row { display: flex; align-items: center; gap: 4rem; margin-bottom: 6rem; }
.zigzag-row.reverse { flex-direction: row-reverse; }
.zigzag-text, .zigzag-media { flex: 1; }

/* ---- FAQ ---- */
.faq-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item:hover {
    border-color: rgba(139, 92, 246, 0.2);
}
.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s;
    user-select: none;
}
.faq-question:hover { background: rgba(255,255,255,0.04); }
.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, padding 0.3s ease;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
}
.faq-item.active .faq-answer { padding: 1rem 1.5rem 1.5rem 1.5rem; max-height: 500px; }
.faq-item.active .faq-question { border-bottom: 1px solid rgba(255,255,255,0.06); }
.faq-icon { transition: transform 0.3s; flex-shrink: 0; margin-left: 1rem; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-item.active { border-color: rgba(139, 92, 246, 0.3); }

/* ---- HUB CARDS (Games) ---- */
.hub-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s, border-color 0.3s;
}
.hub-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}
.hub-card .button.alt:hover { background: rgba(255,255,255,0.1) !important; }
.hub-card .button:not(.alt):hover {
    background: linear-gradient(to right, #7c3aed, #5b21b6) !important;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

/* Game-themed border on hover */
.hub-card[data-game="aion"]:hover    { border-color: var(--game-aion); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(96, 165, 250, 0.25); }
.hub-card[data-game="ragnarok"]:hover { border-color: var(--game-ragnarok); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(245, 158, 11, 0.25); }
.hub-card[data-game="lineage2"]:hover { border-color: var(--game-lineage); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(192, 132, 252, 0.25); }
.hub-card[data-game="minecraft"]:hover { border-color: var(--game-minecraft); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(74, 222, 128, 0.25); }
.hub-card[data-game="tibia"]:hover    { border-color: var(--game-tibia); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(251, 146, 60, 0.25); }
.hub-card[data-game="pw"]:hover       { border-color: var(--game-pw); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(34, 211, 238, 0.25); }
.hub-card[data-game="mu"]:hover       { border-color: var(--game-mu); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(248, 113, 113, 0.25); }
.hub-card[data-game="wow"]:hover      { border-color: var(--game-wow); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(250, 204, 21, 0.25); }
.hub-card[data-game="silkroad"]:hover { border-color: var(--game-silkroad); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(167, 139, 250, 0.25); }
.hub-card[data-game="cabal"]:hover    { border-color: var(--game-cabal); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(232, 121, 249, 0.25); }
.hub-card[data-game="samp"]:hover     { border-color: var(--game-samp); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(52, 211, 153, 0.25); }
.hub-card[data-game="batocera"]:hover { border-color: var(--game-batocera); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(148, 163, 184, 0.25); }

/* ---- COMMUNITY ---- */
.community-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 3rem;
}
.community-chat {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 32px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 750px;
}

/* ---- DOWNLOADS ---- */
.dl-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}
.dl-card-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: flex-end; }

/* ---- WIKI ---- */
.wiki-wrapper { display: flex; min-height: 100vh; padding-top: 60px; }
.wiki-sidebar {
    width: 280px;
    background: #0f0f1a;
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 2rem;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 100;
}
.wiki-content { flex: 1; padding: 3rem; background: #0a0a12; min-width: 0; }
.wiki-page-layout { display: flex; gap: 3rem; align-items: flex-start; }
.wiki-search { margin-bottom: 2rem; position: relative; }
.wiki-search input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
}
.wiki-search i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.wiki-nav h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 1rem; margin-top: 1.5rem; }
.wiki-nav ul { list-style: none; padding: 0; margin: 0; }
.wiki-nav li { margin-bottom: 0.5rem; }
.wiki-nav a { color: #fff; font-size: 0.95rem; display: block; padding: 0.5rem 0.8rem; border-radius: 6px; transition: all 0.3s ease; opacity: 0.8; }
.wiki-nav a:hover, .wiki-nav a.active { background: rgba(139,92,246,0.1); color: var(--primary-light); opacity: 1; }
.wiki-article { max-width: 900px; margin: 0 auto; }
.wiki-breadcrumbs { margin-bottom: 2rem; color: var(--text-muted); font-size: 0.9rem; }
.wiki-breadcrumbs a { color: var(--text-muted); }
.wiki-breadcrumbs a:hover { color: var(--primary-light); }

/* ---- FOOTER ---- */
#footer {
    background: #03040a;
    padding: 5rem 0 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.03);
    margin-top: auto;
}
.social-icons { display: flex; gap: 1rem; margin-top: 2rem; justify-content: flex-start; margin-bottom: 0; }
.social-icons a {
    color: #fff;
    background: rgba(255,255,255,0.03);
    width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s;
}
.social-icons a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(139,92,246,0.4);
    background: linear-gradient(to right, #7c3aed, #5b21b6);
    border-color: #8b5cf6;
}
.footer-links a { color: rgba(255,255,255,0.5); transition: 0.2s; }
.footer-links a:hover { color: #c4b5fd; padding-left: 5px; }

/* ---- ANIMAÇÕES DE ENTRADA ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- GAME FILTER TABS ---- */
.game-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}
.filter-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    padding: 0.5rem 1.4rem;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.filter-btn:hover {
    background: rgba(139,92,246,0.15);
    border-color: rgba(139,92,246,0.4);
    color: var(--primary-light);
}
.filter-btn.active {
    background: rgba(139,92,246,0.25);
    border-color: var(--primary);
    color: #fff;
}
.hub-card.hidden {
    display: none;
}

/* ---- SERVER STATUS BADGE ---- */
.server-status-bar {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.8rem;
    font-family: var(--font-display);
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.status-dot.online { background: #10b981; box-shadow: 0 0 8px #10b981; animation: pulse-green 2s infinite; }
.status-dot.offline { background: #f87171; }
.status-dot.partial { background: #f59e0b; }

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px #10b981; }
    50% { box-shadow: 0 0 12px #10b981; }
}

/* ---- STAT COUNTER ---- */
.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: var(--font-display);
    letter-spacing: 1px;
    color: #fff;
    margin: 0;
    line-height: 1;
}
.stat-label {
    color: rgba(255,255,255,0.6);
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

/* ---- RESPONSIVO ---- */
@media screen and (max-width: 980px) {
    .wiki-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .wiki-sidebar.active { transform: translateX(0); }
    .wiki-content { margin-left: 0; padding: 2rem 1rem; }
}

@media screen and (max-width: 900px) {
    #mobile-menu-btn { display: block; }

    #nav {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh;
        background: radial-gradient(circle at top right, rgba(20,20,35,0.98), #0a0a12);
        backdrop-filter: blur(15px);
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
    }
    #nav.nav-active { display: flex; animation: fadeIn 0.3s ease-in-out; }
    #nav .nav-links { flex-direction: column; gap: 1.5rem; align-items: center; }
    #nav .nav-links a { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; letter-spacing: 2px; }

    .nav-auth-item {
        border-left: none; padding-left: 0; margin-left: 0;
        padding-top: 2rem; margin-top: 2rem;
        border-top: 1px solid rgba(255,255,255,0.1);
        justify-content: center; width: 80%;
    }

    .dynamic-grid, .feature-grid { grid-template-columns: 1fr !important; gap: 1.5rem; }
    .community-layout { grid-template-columns: 1fr; gap: 2rem; }
    .community-chat { height: 500px; padding: 1.5rem; }
    .dl-card-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
    .dl-card-inner > div:first-child { flex-direction: column; gap: 1rem; }
    .dl-card-actions { justify-content: center; }
    .wiki-page-layout { flex-direction: column; gap: 2rem; }
    .wiki-sidebar-sticky { position: static !important; width: 100% !important; }
    .zigzag-row, .zigzag-row.reverse { flex-direction: column !important; text-align: center; }
    .game-filters { gap: 0.5rem; }
}

@media (max-width: 600px) {
    #logo { font-size: 1.3rem; }
    .stat-number { font-size: 2rem; }
}
