/* ══════════════════════════════════════════════════════════════════════════════
   GENERATION STUDIO — Unified Header
   Чёрно-серый Glassmorphism. Единый на ВСЕ страницы.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Header bar ───────────────────────────────────────────────────────────── */
.gs-header {
    position: sticky;
    top: 0;
    z-index: 2000; /* Boosted to stay above progress bars and scrolls */
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* Animated progress line at bottom of header */
.gs-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    transition: opacity 0.3s;
}
.gs-header.generating::after {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    background-size: 300% 100%;
    animation: header-shimmer 4s linear infinite;
}
@keyframes header-shimmer {
    0%   { background-position: 100% center; }
    100% { background-position: -100% center; }
}

.gs-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gs-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */
.gs-logo {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e4e8;
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: color 0.2s;
}
.gs-logo:hover { color: #fff; }

/* ── Nav pills ────────────────────────────────────────────────────────────── */
.gs-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.gs-nav-link {
    padding: 6px 16px;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.gs-nav-link:hover {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.04);
}
.gs-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ── Header icon buttons (save, load, new, settings) ─────────────────────── */
.gs-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.2s;
}
.gs-header-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── Header text buttons (Passport, Synopsis, etc.) ───────────────────────── */
.gs-header-text-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.gs-header-text-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── Divider between groups ───────────────────────────────────────────────── */
.gs-header-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 8px;
}

/* ── Project title (editable, for storyboard) ─────────────────────────────── */
.gs-project-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e4e8;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    outline: none;
    padding: 2px 4px;
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.2s;
}
.gs-project-title:hover,
.gs-project-title:focus {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* ── Status indicator (for chat) ──────────────────────────────────────────── */
.gs-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}
.gs-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}
.gs-status-dot.online { background: #fff; }
.gs-status-dot.error { background: #ef4444; }

/* ── Settings panel (collapsible) ─────────────────────────────────────────── */
.gs-settings-panel {
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.gs-settings-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.gs-settings-label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    white-space: nowrap;
}
.gs-settings-input {
    flex: 1;
    min-width: 200px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
}
.gs-settings-input:focus {
    border-color: rgba(255, 255, 255, 0.15);
}
.gs-settings-status {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .gs-header { padding: 0 12px; height: 48px; }
    .gs-nav-link { padding: 5px 10px; font-size: 0.75rem; }
    .gs-header-text-btn { padding: 4px 10px; font-size: 0.75rem; }
    .gs-header-right { gap: 6px; }
}
