/* ============================================================
   NoslocGames - Shared Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a28;
    --border: #2a2a3a;
    --accent: #f5c518;
    --accent-dim: #b8940f;
    --text: #e0e0e0;
    --text-dim: #888;
    --text-bright: #fff;
    --link: #6ea8fe;
    --link-hover: #9ec5fe;
    --danger: #ff4444;
    --success: #44ff88;
    --purple: #b388ff;
    --font-pixel: 'Press Start 2P', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ---- Header / Nav ---- */
.site-header {
    background: linear-gradient(180deg, #111118 0%, var(--bg-dark) 100%);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-bright);
}

.site-logo img { height: 40px; width: auto; }
.site-logo span { font-family: var(--font-pixel); font-size: 12px; letter-spacing: 1px; }

nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

nav a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: background 0.2s, color 0.2s;
}

nav a:hover, nav a.active {
    background: rgba(245, 197, 24, 0.1);
    color: var(--accent);
}

/* ---- Hero ---- */
.hero {
    text-align: center;
    padding: 40px 24px;
    background: radial-gradient(ellipse at center, rgba(245, 197, 24, 0.05) 0%, transparent 70%);
}

.hero h1 {
    font-family: var(--font-pixel);
    font-size: clamp(20px, 4vw, 36px);
    color: var(--accent);
    margin-bottom: 16px;
    text-shadow: 0 0 30px rgba(245, 197, 24, 0.3);
}

.hero p { font-size: 18px; color: var(--text-dim); max-width: 600px; margin: 0 auto; }

/* ---- Game Card (main site) ---- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    padding: 48px 0;
}

.game-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text);
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(245, 197, 24, 0.15);
    color: var(--text);
}

.game-card-img {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.game-card-body { padding: 20px; }
.game-card-body h3 { font-family: var(--font-pixel); font-size: 14px; color: var(--accent); margin-bottom: 8px; }
.game-card-body p { font-size: 14px; color: var(--text-dim); }

/* ---- Wiki Layout ---- */
.wiki-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: calc(100vh - 73px);
}

.wiki-sidebar {
    background: #0e0e16;
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: sticky;
    top: 73px;
    height: calc(100vh - 73px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.wiki-sidebar h3 {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--accent);
    padding: 12px 20px 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wiki-sidebar a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    color: var(--text-dim);
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.wiki-sidebar a:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.03);
    border-left-color: var(--accent-dim);
}

.wiki-sidebar a.active {
    color: var(--accent);
    background: rgba(245, 197, 24, 0.05);
    border-left-color: var(--accent);
}

.wiki-content {
    padding: 32px 40px;
    max-width: 100%;
    overflow-x: hidden;
}

.wiki-content h1 {
    font-family: var(--font-pixel);
    font-size: clamp(16px, 3vw, 24px);
    color: var(--accent);
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.wiki-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wiki-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-bright);
    margin: 24px 0 12px;
}

.wiki-content p { margin-bottom: 12px; }

.breadcrumb {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--link); }
.breadcrumb span { margin: 0 6px; }

/* ---- Data Tables ---- */
.wiki-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 14px;
}

.wiki-table th {
    background: rgba(245, 197, 24, 0.08);
    color: var(--accent);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wiki-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}

.wiki-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.wiki-table .stat-value { font-family: var(--font-pixel); font-size: 11px; color: var(--accent); }
.wiki-table .stat-label { color: var(--text-dim); }

/* ---- Info Cards ---- */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}

.info-card h4 {
    font-family: var(--font-pixel);
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 12px;
}

.info-card .description { color: var(--text-dim); font-style: italic; margin-bottom: 12px; }

/* ---- Item Grid ---- */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

/* ---- Stat Bars ---- */
.stat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}

.stat-bar-label { font-size: 12px; color: var(--text-dim); min-width: 80px; }

.stat-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width 0.3s;
}

.stat-bar-value { font-family: var(--font-pixel); font-size: 10px; color: var(--text); min-width: 40px; text-align: right; }

/* ---- Tags / Badges ---- */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-weapon { background: rgba(255, 100, 100, 0.15); color: #ff6b6b; }
.tag-passive { background: rgba(100, 200, 255, 0.15); color: #64c8ff; }
.tag-item { background: rgba(200, 100, 255, 0.15); color: #c864ff; }
.tag-character { background: rgba(100, 255, 150, 0.15); color: #64ff96; }
.tag-level { background: rgba(255, 200, 50, 0.15); color: var(--accent); }
.tag-enemy { background: rgba(255, 80, 80, 0.15); color: #ff5050; }
.tag-pickup { background: rgba(150, 255, 150, 0.15); color: #96ff96; }
.tag-chase { background: rgba(255, 100, 100, 0.15); color: #ff6b6b; }
.tag-ranged { background: rgba(100, 150, 255, 0.15); color: #6496ff; }

/* ---- Unlock Box ---- */
.unlock-box {
    background: rgba(245, 197, 24, 0.05);
    border: 1px solid rgba(245, 197, 24, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 12px 0;
}

.unlock-box h5 {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: var(--accent);
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* ---- Tip Box ---- */
.tip-box {
    background: rgba(100, 200, 255, 0.05);
    border-left: 3px solid var(--link);
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
}

.tip-box strong { color: var(--link); }

/* ---- Search ---- */
.wiki-search {
    padding: 0 16px 16px;
}

.wiki-search input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.wiki-search input:focus { border-color: var(--accent); }
.wiki-search input::placeholder { color: var(--text-dim); }

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 48px;
}

/* ---- CTA Button ---- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: #ffd54f;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 197, 24, 0.3);
}

.btn-steam {
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    color: #c7d5e0;
    border: 1px solid #4a6a8a;
}

.btn-steam:hover {
    background: linear-gradient(135deg, #2a475e 0%, #3a6a8e 100%);
    color: #fff;
}

/* ---- Upgrade Levels ---- */
.upgrade-list { list-style: none; padding: 0; }

.upgrade-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.upgrade-list li:last-child { border-bottom: none; }
.upgrade-level { font-family: var(--font-pixel); font-size: 10px; color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar {
        position: fixed;
        left: -260px;
        top: 73px;
        width: 260px;
        height: calc(100vh - 73px);
        z-index: 99;
        transition: left 0.3s;
    }

    .wiki-sidebar.open { left: 0; }

    .sidebar-toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        left: 20px;
        z-index: 100;
        background: var(--accent);
        color: #000;
        border: none;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        font-size: 20px;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    }

    .wiki-content { padding: 24px 16px; }
    .game-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
    .sidebar-toggle { display: none; }
}
