/* Navbar Styles */
.skip-link {
    position: absolute;
    top: -1000px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.25rem;
    background-color: #1f1f1f;
    color: #ffffff;
    border-radius: 0 0 12px 12px;
    text-decoration: none;
    z-index: 1001;
    transition: top 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.navbar {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.05),
        rgba(200, 200, 200, 0.08)
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.4));
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
    object-fit: cover;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1.5rem;
}

.search-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--button-bg);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.search-toggle i {
    font-size: 0.95rem;
}

.search-toggle .shortcut-hint {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-toggle:hover,
.search-toggle:focus {
    outline: none;
    background: var(--button-hover);
    border-color: var(--border-color);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-link i {
    margin-right: 0.5rem;
}

.nav-link:hover {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), rgba(200, 200, 200, 0.2));
    color: var(--text-color);
    box-shadow: 
        0 4px 15px rgba(255, 255, 255, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #ffffff, #e5e7eb);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.25), rgba(200, 200, 200, 0.25));
    color: var(--text-color);
    box-shadow: 
        0 4px 15px rgba(255, 255, 255, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-link.active::after {
    width: 80%;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
}

.navbar-toggle:hover,
.navbar-toggle:focus-visible {
    background-color: var(--button-bg);
}

.navbar-toggle:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid #9ca3ff;
    outline-offset: 3px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 6rem 1.5rem 2rem;
    z-index: 1200;
}

.search-overlay.active {
    display: flex;
}

.search-panel {
    width: min(720px, 100%);
    background: var(--card-bg);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        0 12px 24px rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    color: var(--text-color);
}

.search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--button-bg);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-input-wrapper i {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
}

#site-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
}

#site-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.search-close {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--button-bg);
    color: var(--text-color);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close:hover,
.search-close:focus {
    outline: none;
    background: var(--button-hover);
    border-color: var(--border-color);
}

.search-meta {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.search-meta h2 {
    margin: 0;
    font-size: 1.25rem;
}

.search-description {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.search-results {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

.search-result-item {
    display: block;
    padding: 1rem;
    border-radius: 12px;
    background: var(--button-bg);
    border: 1px solid var(--border-color);
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

.search-result-item h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.search-result-item p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.5;
}

.search-result-item mark {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    padding: 0 0.2rem;
    border-radius: 4px;
}

[data-theme="light"] .search-toggle {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .search-toggle:hover,
[data-theme="light"] .search-toggle:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .search-toggle .shortcut-hint {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .search-input-wrapper {
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .search-input-wrapper i {
    color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] #site-search-input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .search-result-item p {
    color: rgba(60, 60, 60, 0.85);
}

[data-theme="light"] .search-result-item mark {
    background: rgba(255, 230, 150, 0.8);
}

[data-theme="light"] .search-empty {
    color: rgba(60, 60, 60, 0.8);
}

.search-result-item:hover,
.search-result-item:focus {
    border-color: var(--border-color);
    background: var(--button-hover);
    outline: none;
}

.search-empty {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
    background: var(--button-bg);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    text-align: center;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar-container {
        height: 60px;
        padding: 0 1rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-img {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }
    
    .navbar-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.85),
            rgba(0, 0, 0, 0.8),
            rgba(0, 0, 0, 0.85)
        );
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(25px) saturate(180%);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }

    .navbar-actions {
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .search-toggle {
        padding: 0.45rem 0.6rem;
        gap: 0.35rem;
    }

    .search-toggle span,
    .search-toggle .shortcut-hint {
        display: none;
    }

    .search-overlay {
        padding: 5rem 1rem 1.5rem;
    }

    .search-panel {
        padding: 1.25rem;
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 0.8rem;
        padding: 2rem 1rem;
        height: 100%;
        align-items: stretch;
        width: 100%;
        max-width: none;
    }
    
    .nav-item {
        width: 100%;
        margin: 0;
        opacity: 0;
        transform: translateX(-30px);
        animation: slideInLeft 0.6s ease forwards;
    }
    
    .nav-item:nth-child(2) { animation-delay: 0.1s; }
    .nav-item:nth-child(3) { animation-delay: 0.2s; }
    .nav-item:nth-child(4) { animation-delay: 0.3s; }
    
    .nav-link {
        display: block;
        padding: 1.8rem 2rem;
        text-align: center;
        border-radius: 18px;
        font-size: 1.4rem;
        font-weight: 600;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.08)
        );
        border: 1px solid rgba(255, 255, 255, 0.25);
        margin: 0;
        transition: all 0.3s ease;
        backdrop-filter: blur(15px);
        box-shadow: 
            0 4px 12px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        width: 100%;
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
        color: rgba(255, 255, 255, 0.95);
    }

    .nav-link i {
        margin-right: 0.75rem;
    }
    
    .nav-link:hover {
        background: linear-gradient(45deg, rgba(255, 255, 255, 0.25), rgba(200, 200, 200, 0.25));
        transform: scale(1.02);
        box-shadow: 
            0 6px 20px rgba(255, 255, 255, 0.25),
            0 2px 8px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        border-color: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(20px);
        color: white;
    }
    
    .nav-link.active {
        background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(200, 200, 200, 0.3));
        box-shadow: 
            0 6px 20px rgba(255, 255, 255, 0.3),
            0 2px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
        border-color: rgba(255, 255, 255, 0.6);
        color: white;
        font-weight: 700;
    }
    
    .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 5px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(200, 200, 200, 0.6));
        transform: scaleY(0);
        transition: transform 0.3s ease;
        border-radius: 0 3px 3px 0;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    
    .nav-link:hover::before {
        transform: scaleY(1);
    }
    
    .navbar-toggle {
        display: flex;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    /* Hamburger Animation */
    .navbar-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .navbar-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    
    .navbar-toggle.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    @keyframes slideInLeft {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar-container {
        padding: 0 2rem;
    }
    
    .navbar-nav {
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.8rem;
    }
}

/* Large Screen Styles */
@media (min-width: 1025px) {
    .navbar-container {
        padding: 0 2rem;
    }
    
    .navbar-nav {
        gap: 2.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 1.2rem;
    }
}

/* Dark/Light Theme Transitions */
.navbar {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-link {
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.logo-text {
    transition: color 0.3s ease;
}

.hamburger-line {
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
} 
