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

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

:root {
    --gold: #ffb300;
    --gold-light: #ffd54f;
    --gold-dark: #ff8f00;
    --gold-glow: rgba(255, 179, 0, 0.4);
    --gold-subtle: rgba(255, 179, 0, 0.08);
    --gold-border: rgba(255, 179, 0, 0.15);
    --bg-primary: #050505;
    --bg-secondary: #0c0c0c;
    --bg-tertiary: #141414;
    --bg-elevated: #1a1a1a;
    --text-primary: #e8e8e8;
    --text-secondary: #9e9e9e;
    --text-muted: #666;
    --font-display: 'Press Start 2P', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

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

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

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

a:hover {
    color: var(--gold-light);
}

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gold-border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    z-index: 1000;
    gap: 32px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
}

.nav-logo span {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--gold);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
    background: var(--gold-subtle);
}

.nav-search {
    margin-left: auto;
    position: relative;
}

.nav-search input {
    background: var(--bg-tertiary);
    border: 1px solid var(--gold-border);
    border-radius: 8px;
    padding: 8px 16px 8px 36px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-body);
    width: clamp(160px, 22vw, 240px);
    outline: none;
    transition: all 0.2s;
}

.nav-search input::placeholder {
    color: var(--text-muted);
}

.nav-search input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.1);
    width: clamp(180px, 30vw, 300px);
}

.nav-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.page-content {
    padding-top: 64px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.gold-text {
    color: var(--gold);
}

.gold-glow-text {
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow), 0 0 40px rgba(255, 179, 0, 0.2);
}

.pixel-font {
    font-family: var(--font-display);
}

.footer-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--gold-border);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-left img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    opacity: 0.6;
}

.footer-left span {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-right {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-right a {
    color: var(--text-secondary);
}

.footer-right a:hover {
    color: var(--gold);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle svg {
    width: 24px;
    height: 24px;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--gold-border);
    border-radius: 8px;
    overflow: hidden;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.search-results-dropdown.visible {
    display: block;
}

.search-result-item {
    padding: 10px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--gold-subtle);
}

.search-result-item .result-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.search-result-item .result-text {
    font-size: 13px;
    color: var(--text-primary);
}

.search-result-item .result-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.search-result-item .result-snippet {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-item .result-category {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 1024px) {
    .nav-bar {
        padding: 0 20px;
        gap: 16px;
    }

    .nav-links a {
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(5, 5, 5, 0.98);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--gold-border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-search {
        display: none;
    }

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .nav-logo span {
        font-size: 10px;
    }

    .footer-bar {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-logo span {
        display: none;
    }

    .footer-bar {
        padding: 18px 14px;
    }

    .footer-left span,
    .footer-right {
        font-size: 11px;
    }
}
