/* ==========================================================================
   QuickPlayHub - Header & Navigation Styles
   ========================================================================== */

:root {
    --header-height: 62px;
}

.site-header {
    background: #1b1a30;
    border-bottom: 0;
    padding: 0 12px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.13);
}

.site-header .header-container {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 576px) minmax(0, 1fr);
    gap: 20px;
}

.site-header .header-left {
    gap: 12px;
    min-width: 0;
    align-items: center;
}

.site-header .sidebar-toggle-btn {
    width: 28px;
    height: 38px;
    flex-shrink: 0;
    color: #efedf8;
    border-radius: 6px;
}

.site-header .brand-logo {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.site-header .brand-logo img {
    width: auto;
    height: 38px;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
}

.site-header .brand-site-title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.4px;
    white-space: nowrap;
    line-height: 1;
    transition: color 0.15s ease;
}

.site-header .brand-logo:hover .brand-site-title {
    color: #d2ccff;
}

.site-header .header-nav {
    display: inline-flex;
    align-items: center;
}

.site-header .header-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #efedf8;
    background: #2e2c4c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.site-header .header-nav-link:hover {
    color: #ffffff;
    background: #3b385d;
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.site-header .header-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #7b68ee, #5f3dc4);
    border-color: #7b68ee;
    box-shadow: 0 2px 10px rgba(123, 104, 238, 0.4);
}

.site-header .header-center {
    width: 100%;
    max-width: 576px;
}

.site-header .search-pill {
    height: 38px;
    padding: 0 16px;
    background: #2e2c4c;
}

.site-header .search-pill input {
    font-size: 14px;
    color: #f4f2ff;
}

.site-header .search-pill input::placeholder,
.site-header .search-icon {
    color: #b2afc7;
}

.site-header .header-right {
    justify-self: end;
    gap: 8px;
}

.site-header .icon-btn {
    width: 36px;
    height: 36px;
    background: #2e2c4c;
    color: #bdb9d3;
    flex-shrink: 0;
}

.site-header .icon-btn:hover {
    transform: none;
    background: #3b385d;
}

.site-header .header-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #d2ccff;
    color: #211c67;
    line-height: 1.2;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.site-header .header-install-btn:hover {
    background: #e2ddff;
}

.site-header button:focus-visible,
.site-header a:focus-visible {
    outline: 2px solid #d2ccff;
    outline-offset: 3px;
}

#header-install-help {
    width: min(400px, calc(100% - 32px));
    margin: auto;
    padding: 24px;
    border: 1px solid #514b79;
    border-radius: 16px;
    background: #1b1a30;
    color: #f4f2ff;
}

#header-install-help::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

#header-install-help h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

#header-install-help p {
    margin-bottom: 18px;
    line-height: 1.6;
}

#header-install-help button {
    background: #d2ccff;
    color: #211c67;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
}

@media (max-width: 1000px) and (min-width: 768px) {
    .site-header .header-container {
        grid-template-columns: auto minmax(180px, 1fr) auto;
        gap: 16px;
    }
    .site-header .brand-logo img {
        width: auto;
        height: 36px;
        max-width: 150px;
    }
    .site-header .brand-site-title {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .site-header .header-container {
        display: flex;
        gap: 8px;
    }
    .site-header .header-left {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    .site-header .brand-logo img {
        width: auto;
        height: 34px;
        max-width: 130px;
    }
    .site-header .brand-site-title {
        font-size: 16px;
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .site-header #mobile-search-btn {
        display: flex !important;
    }
    .site-header .header-install-btn {
        width: 36px;
        height: 36px;
        padding: 0;
    }
    .site-header .header-install-btn span {
        display: none;
    }
    .site-header .header-nav {
        display: none;
    }
}

@media (max-width: 440px) {
    .site-header .brand-site-title {
        display: none;
    }
}
