/* --- NAVIGATION COMPONENT (Mobile Optimized) --- */
.tkr-main-nav {
    position: fixed;
    top: 20px; left: 20px; 
    z-index: 99999; 
    display: flex; align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 5px 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* MENU ITEMS WRAPPER */
.tkr-nav-items {
    display: flex; gap: 10px; align-items: center;
}

/* LINKS */
.nav-link {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.85rem; font-weight: 600;
    padding: 8px 16px; border-radius: 20px;
    transition: all 0.2s ease; cursor: pointer;
    display: flex; align-items: center; white-space: nowrap;
}
.nav-link:hover { background: var(--bg-panel-hover); color: var(--text-main); }

/* DROPDOWNS */
.nav-item.has-dropdown { position: relative; height: 100%; }
.nav-dropdown {
    position: absolute; top: 100%; left: 0;
    background: #09090b; border: 1px solid var(--border-color);
    border-radius: 12px; padding: 10px; min-width: 220px; 
    display: none; flex-direction: column; gap: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); margin-top: 10px;
}
.nav-item.has-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 20px; background: transparent; }
.nav-item.has-dropdown:hover .nav-dropdown { display: flex; }

.dropdown-link {
    display: flex; align-items: center; gap: 10px; padding: 10px; 
    color: var(--text-muted); text-decoration: none; border-radius: 8px;
    transition: background 0.2s;
}
.dropdown-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.dropdown-link .icon { font-size: 1.2rem; }

/* MOBILE HAMBURGER ICON */
.tkr-mobile-toggle {
    display: none;
    flex-direction: column; gap: 4px;
    background: transparent; border: none; cursor: pointer; 
    padding: 12px; 
    margin: -5px; 
    touch-action: manipulation;
}
.tkr-mobile-toggle span {
    display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: 0.3s;
}

/* MOBILE PROFILE SHORTCUT */
.tkr-mobile-user-icon {
    display: none;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.1rem;
    padding: 10px 15px;
    margin-left: 5px;
    cursor: pointer;
    line-height: 1;
}

/* SEO HEADER */
.seo-header {
    max-width: var(--max-width); margin: 80px auto 40px auto; 
    text-align: center; padding: 0 20px; position: relative; z-index: 1;
}
.seo-header h1 { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 15px; color: var(--text-main); }

/* GLITCH ANIMATION */
.tkr-glitch { position: relative; color: var(--text-main); }
.tkr-glitch::before, .tkr-glitch::after {
    content: attr(data-text);
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-app); 
}
.tkr-glitch::before {
    left: 2px; text-shadow: -1px 0 red; clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.tkr-glitch::after {
    left: -2px; text-shadow: -1px 0 blue; clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 15px, 0); }
    20% { clip: rect(60px, 9999px, 70px, 0); }
    40% { clip: rect(20px, 9999px, 5px, 0); }
    60% { clip: rect(80px, 9999px, 50px, 0); }
    80% { clip: rect(10px, 9999px, 40px, 0); }
    100% { clip: rect(30px, 9999px, 90px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(15px, 9999px, 60px, 0); }
    20% { clip: rect(80px, 9999px, 20px, 0); }
    40% { clip: rect(30px, 9999px, 10px, 0); }
    60% { clip: rect(50px, 9999px, 80px, 0); }
    80% { clip: rect(10px, 9999px, 90px, 0); }
    100% { clip: rect(40px, 9999px, 30px, 0); }
}

/* =========================================
   MOBILE RESPONSIVE (BURGER MENU)
   ========================================= */
@media (max-width: 1024px) {
    /* 1. POSITIONING */
    .tkr-main-nav {
        top: 20px; left: 20px; 
        /* [FIX] Constrain width so it doesn't span awkwardly */
        width: auto;
        max-width: calc(100% - 40px);
        
        flex-direction: row; 
        align-items: center;
        padding: 0;
        overflow: visible; 
        background: rgba(9, 9, 11, 0.95);
        border: 1px solid var(--border-color);
        backdrop-filter: blur(10px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    }

    /* 2. SHOW TOGGLE BUTTONS */
    .tkr-mobile-toggle { display: flex; border-right: 1px solid rgba(255,255,255,0.1); border-radius: 12px 0 0 12px; }
    
    .tkr-mobile-user-icon { display: block; border-left: none; padding: 12px 18px; border-radius: 0 12px 12px 0; }

    /* 3. HIDE DESKTOP LINKS INITIALLY */
    .tkr-nav-items {
        display: none; 
        position: absolute;
        top: 100%; left: 0; 
        width: 240px; /* Wider dropdown for better touch targets */
        flex-direction: column; 
        background: rgba(9, 9, 11, 0.98);
        border: 1px solid var(--accent-primary);
        border-radius: 12px;
        padding: 15px;
        margin-top: 10px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    }

    .desktop-only-login { display: none; }

    /* 4. OPEN STATE (Toggled by JS) */
    .tkr-main-nav.open .tkr-nav-items {
        display: flex;
        animation: slideDown 0.2s ease-out;
    }

    /* 5. MENU ITEMS STYLING */
    .nav-link { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-item.has-dropdown { width: 100%; }
    
    .nav-dropdown {
        position: static; display: flex; background: transparent;
        box-shadow: none; border: none; padding-left: 15px;
        margin-top: 0;
    }
    
    .tkr-main-nav.open .tkr-mobile-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .tkr-main-nav.open .tkr-mobile-toggle span:nth-child(2) { opacity: 0; }
    .tkr-main-nav.open .tkr-mobile-toggle span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}