/* Top Navigation Bar */
.top-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-color);
    border-bottom: 1px solid transparent;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 20px;
    z-index: 2000;
    transition: all 0.3s ease;
}

/* Add background and shadow when scrolled */
.top-nav-bar.scrolled {
    background: rgba(30, 30, 34, 0.95);
    border-bottom-color: var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

/* Left side - bug report controls */
.top-nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
}

/* Center - site title */
.site-title {
    margin: 0;
    font-size: 1.5em;
    color: var(--accent-color);
    font-weight: bold;
    white-space: nowrap;
    text-align: center;
    justify-self: center;
}

.bug-report-controls {
    display: flex;
    gap: 8px;
}

/* Icon buttons in top nav */
.top-nav-icon-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    position: relative;
}

.top-nav-icon-btn:hover {
    background: var(--input-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(30, 255, 0, 0.3);
}

.top-nav-icon-btn svg {
    display: block;
}

/* Badge for bug reports */
.top-nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.top-nav-badge.has-new {
    background: #ff4444;
    animation: pulse 2s ease-in-out infinite;
}

/* User controls stay on the right */
.user-controls {
    position: static;
    top: auto;
    right: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

/* Add top padding to main content so it doesn't hide under nav */
.main-content {
    padding-top: 60px;
}

/* Responsive */
@media (max-width: 900px) {
    .site-title {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .top-nav-bar {
        height: auto;
        padding: 10px;
        grid-template-columns: auto 1fr auto;
    }

    .top-nav-left {
        order: 1;
    }

    .site-title {
        font-size: 1em;
        order: 2;
    }

    .user-controls {
        flex-wrap: wrap;
        gap: 8px;
        order: 3;
    }

    .main-content {
        padding-top: 70px; /* Extra padding for wrapped nav */
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 0.9em;
    }

    .bug-report-controls {
        gap: 4px;
    }

    .top-nav-icon-btn {
        padding: 6px;
    }

    .top-nav-icon-btn svg {
        width: 16px;
        height: 16px;
    }
}
