/* ============================================
   SHARED NAVIGATION STYLES
   Matches index.html mega dropdown nav
   ============================================ */

.nav-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 10px 20px 0;
    width: 100%;
    max-width: 1400px;
}

.nav {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 50px;
    padding: 12px 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
}

.nav::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 52px;
    background: conic-gradient(from var(--angle, 0deg), transparent, var(--gold, #d4af37), transparent, var(--gold, #d4af37), transparent);
    z-index: -1;
    animation: spinBorder 4s linear infinite;
    opacity: 0.5;
}

@keyframes spinBorder {
    to { --angle: 360deg; }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.pokeball-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(180deg, #ff1a1a 50%, #fff 50%);
    border-radius: 50%;
    position: relative;
    animation: pokeballSpin 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.pokeball-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border: 3px solid #333;
    border-radius: 50%;
}

.pokeball-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #333;
    transform: translateY(-50%);
}

@keyframes pokeballSpin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.nav-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold-light, #f0d875), var(--gold, #d4af37), var(--gold-dark, #b8941f));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    color: var(--text-dim, #888);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--gold, #d4af37);
    background: rgba(212, 175, 55, 0.1);
}

/* Mega Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-link::after {
    content: ' ▾';
    font-size: 10px;
}

.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 25px;
    min-width: min(500px, 90vw);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    pointer-events: none;
    margin-top: 10px;
}

/* Bridge gap between link and dropdown */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
}

@media (hover: hover) {
    .nav-dropdown:hover .mega-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}
}

.mega-item-simple {
    display: block;
    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.mega-item-simple:hover {
    background: rgba(212, 175, 55, 0.1);
}

.mega-item-simple h4 {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--gold, #d4af37);
}

.mega-item-simple p {
    font-size: 12px;
    color: var(--text-dim, #888);
}

.nav-divider {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 5px;
    font-weight: 300;
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border: none;
    background: none;
    z-index: 10001;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold, #d4af37);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.98);
    z-index: 9998;
    padding: 100px 30px 30px;
    overflow-y: auto;
}

.mobile-nav-overlay.active { display: block; }

.mobile-nav-overlay a {
    display: block;
    color: var(--text, #fff);
    text-decoration: none;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.2s;
}

.mobile-nav-overlay a:hover {
    color: var(--gold, #d4af37);
    background: rgba(212, 175, 55, 0.05);
}

.mobile-nav-overlay .mobile-nav-section {
    color: var(--gold, #d4af37);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 20px 20px 8px;
    border-bottom: none;
    display: block;
}

.mobile-nav-overlay .mobile-nav-section:hover { background: none; }

/* Touch devices — hover rule already scoped to (hover: hover) above */

/* Responsive */
@media (max-width: 1024px) {
    .hamburger-btn { display: flex !important; }
    .nav-container { top: 0; left: 0; right: 0; transform: none; padding: 0; width: 100%; max-width: 100%; z-index: 9999; }
    .nav { border-radius: 0; padding: 6px 8px; gap: 4px; width: 100%; flex-wrap: wrap; }
    .nav::before { display: none; }
    .nav-brand { display: block !important; font-size: 12px; }
    .nav-logo { gap: 5px; width: auto; margin-bottom: 0; flex-shrink: 0; }
    .pokeball-logo { width: 20px; height: 20px; }
    .nav-links { display: flex !important; flex-wrap: wrap; gap: 2px; flex: 1; min-width: 0; }
    .nav-links > .nav-divider { display: none !important; }
    .nav-desktop-only { display: none !important; }
    .nav-links .nav-link { font-size: 10px; padding: 3px 6px; white-space: nowrap; }
    .nav-dropdown > .nav-link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .mega-dropdown {
        position: fixed !important;
        top: 70px !important;
        left: 8px !important;
        right: 8px !important;
        transform: none !important;
        border-radius: 12px !important;
        padding: 12px !important;
        min-width: 0 !important;
        width: auto !important;
        grid-template-columns: 1fr !important;
        gap: 4px !important;
        z-index: 10200 !important;
        margin-top: 0 !important;
        max-height: calc(100vh - 52px) !important;
        overflow-y: auto !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .mega-dropdown .mega-item-simple { padding: 10px 14px !important; }
    .mega-dropdown .mega-item-simple h4 { font-size: 13px !important; margin: 0 !important; }
    .mega-dropdown .mega-item-simple p { font-size: 11px !important; margin: 2px 0 0 !important; }
}

@media (max-width: 900px) {
    .nav-divider { display: none; }
}
