:root {
    --bg-dark: #0f0f12;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --font-main: 'Inter', sans-serif;

    /* Faction Colors */
    --color-sol: #98d734;
    --color-rich: #4a90e2;
    --color-scrappers: #e67e22;
    --color-mart: #ff69b4;
    --color-church: #f1c40f;
    --color-android: #9b9b9b;
    --color-neutral: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(15, 15, 18, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    color: white;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: white;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, rgba(74, 144, 226, 0.1) 0%, transparent 70%),
        linear-gradient(-45deg, rgba(255, 105, 180, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

h1 {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.btn-main {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: black;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* Portals Section */
.portals-section {
    padding: 100px 0;
    background: #121216;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 60px;
    text-transform: uppercase;
    font-weight: 800;
    background: linear-gradient(to right, #cfc7f8 0%, #ebbba7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portal-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.portal-card:hover {
    transform: translateY(-10px);
    border-color: var(--portal-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--portal-color);
}

.portal-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.btn-portal {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    border: 1px solid var(--portal-color);
    color: var(--portal-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-portal:hover {
    background: var(--portal-color);
    color: black;
}

/* Factions Section */
.factions-section {
    padding: 100px 0;
}

.factions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

@media (min-width: 1400px) {
    .factions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


.faction-card {
    background: rgba(20, 20, 24, 0.8);
    border-radius: 12px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.faction-card:hover {
    transform: scale(1.02);
    border-color: var(--faction-color);
}

.faction-card .faction-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: var(--faction-color);
    filter: blur(100px);
    opacity: 0.1;
    border-radius: 50%;
    transition: opacity 0.3s;
}

.faction-card:hover .faction-glow {
    opacity: 0.2;
}

.faction-header {
    margin-bottom: 20px;
}

.faction-header h3 {
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.tagline {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.faction-body p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.aesthetic {
    color: var(--text-secondary);
}

/* Ecosystem Section */
.ecosystem-section {
    padding: 100px 0;
    background: #16161a;
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.rivalry-card {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rivalry-header {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.vs {
    margin: 0 10px;
    color: #555;
    font-size: 0.8rem;
}

.rival-name.blue {
    color: var(--color-rich);
}

.rival-name.orange {
    color: var(--color-scrappers);
}

.rival-name.pink {
    color: var(--color-mart);
}

.rival-name.green {
    color: var(--color-sol);
}

.rival-name.yellow {
    color: var(--color-church);
}

.rival-name.grey {
    color: var(--color-android);
}

/* Footer */
.site-footer {
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.8rem;
}

/* Animations */
@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.glitch-title:hover {
    animation: glitch 0.5s infinite;
}

/* -------------------------
   WIKI STYLES
   ------------------------- */

/* Wiki Archive Header */
.wiki-archive-header {
    background: linear-gradient(180deg, rgba(26, 26, 46, 1) 0%, rgba(15, 15, 18, 1) 100%);
    padding: 120px 0 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.wiki-search-form {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-field {
    width: 60%;
    padding: 15px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.search-field:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-rich);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.search-submit {
    padding: 0 30px;
    border-radius: 30px;
    border: none;
    background: var(--color-rich);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-submit:hover {
    transform: scale(1.05);
}

/* Wiki Categories */
.section-heading {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 2rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.wiki-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.wiki-cat-card {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    transition: all 0.3s;
}

.wiki-cat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-sol);
    transform: translateY(-5px);
}

.wiki-cat-card h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.wiki-cat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.wiki-cat-card .count {
    display: inline-block;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 10px;
    color: #888;
}

.empty-state {
    opacity: 0.6;
    pointer-events: none;
    border-style: dashed;
}

/* Wiki Entries List */
.wiki-entries-list {
    max-width: 900px;
    margin: 0 auto;
}

.wiki-entry-card {
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 20px;
    padding: 25px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: border-color 0.3s;
}

.wiki-entry-card:hover {
    border-left-color: var(--color-mart);
    background: rgba(255, 255, 255, 0.04);
}

.entry-title a {
    color: white;
    text-decoration: none;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-rich);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Single Wiki Page */
.wiki-single-container {
    padding-top: 120px;
    /* Header space */
    padding-bottom: 80px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 50px;
}

@media (max-width: 768px) {
    .wiki-single-container {
        grid-template-columns: 1fr;
    }
}

.wiki-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 30px;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wiki-nav-list {
    list-style: none;
    padding: 0;
}

.wiki-nav-list li {
    margin-bottom: 10px;
}

.wiki-nav-list a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.wiki-nav-list a:hover {
    color: white;
    text-decoration: underline;
}

.wiki-nav-list .current_page_item>a {
    color: var(--color-sol);
    font-weight: 700;
}

.wiki-nav-list .children {
    margin-left: 15px;
    margin-top: 5px;
    list-style: none;
}

/* Entry Content Typography */
.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: white;
}

.entry-content p {
    margin-bottom: 1.2em;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.2em;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: #bbb;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: white;
}

/* Wiki Glossary Tooltips */
.faction-term {
    border-bottom: 1px dotted var(--color-rich);
    cursor: help;
    position: relative;
    color: var(--color-rich);
    font-weight: 600;
}

.faction-term:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 20, 0.95);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    width: 250px;
    font-size: 0.9rem;
    line-height: 1.4;
    z-index: 1000;
    pointer-events: none;
    text-align: center;
    margin-bottom: 10px;
    backdrop-filter: blur(5px);
}

.faction-term:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(15, 15, 20, 0.95) transparent transparent transparent;
    margin-bottom: -2px;
    z-index: 1000;
}


/* -------------------------
   RESPONSIVE & MOBILE STYLES
   ------------------------- */

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Mobile Nav Active State (Hamburger Animation) */
.mobile-nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Base Responsive Styles */
@media screen and (max-width: 992px) {
    h1 {
        font-size: 3.5rem;
        letter-spacing: 2px;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 768px) {

    /* Header & Nav */
    .container-header {
        padding: 0 20px;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        /* Header height */
        left: 0;
        width: 100%;
        height: 0;
        background: rgba(15, 15, 18, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        overflow: hidden;
        transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 0;
        z-index: 999;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav.open {
        height: calc(100vh - 70px);
        padding-top: 40px;
    }

    .main-nav a {
        margin: 15px 0;
        font-size: 1.5rem;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s, transform 0.3s;
    }

    .main-nav.open a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered animation for links */
    .main-nav.open a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .main-nav.open a:nth-child(2) {
        transition-delay: 0.2s;
    }

    .main-nav.open a:nth-child(3) {
        transition-delay: 0.3s;
    }

    /* Hero */
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    /* Grids */
    .portals-grid,
    .factions-grid,
    .ecosystem-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        padding: 0 10px;
    }

    .portal-card,
    .faction-card {
        margin-bottom: 20px;
    }

    /* Wiki Sidebar Mobile */
    .wiki-single-container {
        grid-template-columns: 1fr;
        padding-top: 100px;
    }

    .wiki-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: 30px;
        margin-bottom: 30px;
    }

    /* Footer */
    .site-footer {
        padding: 30px 20px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .btn-main {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2rem;
    }
}
/* -------------------------
   BATTLEFIELD GRID SHORTCODE
   ------------------------- */
.battlefield-container {
    display: inline-block;
    background: rgba(15, 15, 18, 0.5);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.battlefield-grid {
    display: grid;
    /* 5 cols x 6 rows */
    grid-template-columns: repeat(5, 40px);
    grid-template-rows: repeat(6, 40px);
    gap: 2px;
}

.battlefield-cell {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}

/* Cell Types */
.battlefield-cell.cell-white {
    background: rgba(255, 255, 255, 0.9);
    border-color: white;
}

.battlefield-cell.cell-grey {
    background: rgba(100, 100, 100, 0.5);
    border-color: rgba(150, 150, 150, 0.5);
}

/* Icons within cells */
.battlefield-cell.has-icon {
    /* If needed specific styles for cells with icons */
}

.bf-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.bf-target {
    color: #e74c3c; /* Red color for target */
}

.bf-arrow {
    color: white;
}

/* Arrow Orientations */
.icon-arrow-up .bf-arrow {
    transform: rotate(0deg);
}

.icon-arrow-right .bf-arrow {
    transform: rotate(90deg);
}

.icon-arrow-down .bf-arrow {
    transform: rotate(180deg);
}

.icon-arrow-left .bf-arrow {
    transform: rotate(-90deg);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .battlefield-grid {
        grid-template-columns: repeat(5, 30px);
        grid-template-rows: repeat(6, 30px);
    }
    
    .battlefield-cell {
        width: 30px;
        height: 30px;
    }
    
    .bf-icon {
        width: 18px;
        height: 18px;
    }
}

