/* Legion Design System */
:root {
    --bg-dark: #0a0a12;
    --bg-card: rgba(20, 20, 35, 0.8);
    --primary: #ffcc00;
    /* Gold/Yellow accent */
    --primary-hover: #e6b800;
    --secondary: #6a0dad;
    /* Deep Purple */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --font-main: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* Header & Navigation */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#nav .nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
}

#nav a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-main);
}

#nav a:hover,
#nav li.active a {
    color: var(--primary);
    background: rgba(255, 204, 0, 0.1);
}

/* Hero Section */
#banner {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/banner.jpg');
    /* Ensure banner.jpg exists or replace */
    background-size: cover;
    background-position: center;
    padding-top: 80px;
    /* Header height */
}

#banner h2 {
    font-size: 3.5rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#banner p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.3);
}

.button.alt {
    background: transparent;
    border: 2px solid var(--text-main);
    color: var(--text-main);
}

.button.alt:hover {
    background: var(--text-main);
    color: #000;
}

/* Sections */
.wrapper {
    padding: 4rem 0;
}

.wrapper.style2 {
    background: #11111a;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: var(--transition);
}


/* Footer */
#footer {
    background: #050508;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-main);
}

.social-icons a:hover {
    background: var(--primary);
    color: #000;
}

#copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Wiki Styles */
.wiki-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
    /* Height of fixed header */
}

.wiki-sidebar {
    width: 280px;
    background: #0f0f1a;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 100;
}

.wiki-content {
    flex: 1;
    margin-left: 280px;
    /* Width of sidebar */
    padding: 3rem;
    background: #0a0a12;
}

.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;
    text-decoration: none;
    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(var(--primary-rgb), 0.1);
    color: var(--primary);
    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);
    text-decoration: none;
}

.wiki-breadcrumbs a:hover {
    color: var(--primary);
}

/* Responsive Wiki */
@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;
    }
}

/* =========================================================================
   CUSTOM HEADER ENHANCEMENTS AND RESPONSIVENESS
   ========================================================================= */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: fadeIn 0.5s ease-in-out; }

#logo {
    text-decoration: none;
    background: linear-gradient(to right, #ffffff, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#nav .nav-links {
    align-items: center;
    margin: 0;
    padding: 0;
}

#nav a {
    text-transform: none;
    font-weight: 500;
}

.nav-auth-item {
    border-left: 1px solid rgba(255,255,255,0.1);
    padding-left: 1.5rem;
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.user-greeting {
    color: #8b5cf6;
    font-weight: bold;
    font-size: 0.9rem;
}

.logout-btn {
    color: #f87171 !important;
    font-size: 0.8rem !important;
    margin-left: 10px;
    font-weight: bold !important;
}

.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;
}

#mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================================================
   RESPONSIBILITY HELPER CLASSES (Clean HTML Approach)
   ========================================================================= */

/* 1. Dynamic Grid (Jogos.php & Index feature-grid) */
.dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* 2. Community Layout */
.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;
}

/* 3. Downloads Layout */
.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;
}

/* 4. Wiki Layout */
.wiki-page-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}


/* =========================================================================
   MOBILE RESPONSIVENESS MEDIA QUERIES (max-width: 900px)
   ========================================================================= */

@media screen and (max-width: 900px) {
    
    /* Header Mobile Overlay */
    #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: 'Outfit', sans-serif;
        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%;
    }

    /* Grids & Framework Modificators for Mobile */
    
    .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 {
        flex-direction: column !important;
        text-align: center;
    }
    .zigzag-row.reverse {
        flex-direction: column !important;
    }
}
