/* ══════════════════════════════════════════════
   AUTO-QUIZ — HEADER CSS
   Header styling, title scroll container, back button.
   ══════════════════════════════════════════════ */

.header {
    background-color: var(--bg);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border);
    font-family: "Lexend Deca", sans-serif;
    transition: transform 0.28s cubic-bezier(0.2, 0, 0.2, 1);
    will-change: transform;
}

.header-scroll-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 16px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 3px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.header-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.header-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.header-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
}

.header-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.header-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    min-width: clamp(110px, 38vw, 220px);
}

.header-title {
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    text-transform: capitalize;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 8px;
    transition: transform 0.1s ease;
    color: var(--text-dark);
    text-decoration: none;
}

.back-btn:active {
    transform: scale(0.88);
}
