.topbar {
    display: flex;
    justify-content: space-between;
    background: linear-gradient(135deg,
                #0f0f23 0%,
                rgba(99, 102, 241, 0.1) 30%,
                rgba(139, 92, 246, 0.1) 60%,
                #16213e 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color)) 1;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.topbar-container {
    width: 100%;
    max-width: min(70vw, 1400px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-title-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-title:hover {
    transform: translateY(-2px);
}

.info-button {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: help;
    transition: all 0.3s ease;
    margin-left: 0;
}

.info-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.info-button svg {
    width: 20px;
    height: 20px;
}

.info-tooltip {
    display: none;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    min-width: 250px;
    max-width: 300px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    white-space: normal;
    text-align: center;
    transition: opacity 0.3s ease;
}

.info-button:hover .info-tooltip {
    display: block;
    visibility: visible;
    opacity: 1;
}

.info-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-left: -5px;
    border: 6px solid transparent;
    border-bottom-color: var(--border-color);
}

.active-retro-form {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-secondary);
    top: 3px;
    left: 2px;
    transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked~.toggle-slider {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.toggle-label input[type="checkbox"]:checked~.toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

.toggle-label:hover .toggle-slider {
    border-color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: 0;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-button svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .topbar {
        padding: 1rem;
    }

    .topbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-buttons {
        width: 100%;
        justify-content: center;
    }

    .active-retro-form {
        position: static;
        transform: none;
    }
}


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