/* layout-3: masthead-panel — meta strip + pill nav bar */

.masthead-panel {
    position: relative;
    z-index: 5;
}

.masthead-panel__container {
    max-width: 100%;
}

.masthead-panel__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0 14px;
}

/* secondary meta row */
.masthead-panel__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
}

.masthead-panel__meta-left,
.masthead-panel__meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.masthead-panel__meta-right {
    flex-shrink: 0;
}

.masthead-panel__reward {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 200px;
    height: 28px;
    padding: 0 12px 0 2px;
    border-radius: 999px;
    background: linear-gradient(285deg, #ffb800 -4%, #fff173 115%);
    color: #090f1e;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masthead-panel__reward-icon {
    max-height: 34px;
    margin-left: -6px;
    flex-shrink: 0;
}

.masthead-panel__tool {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(78, 93, 134, 0.35);
    text-decoration: none;
    flex-shrink: 0;
}

.masthead-panel__tool svg {
    fill: #fff;
    width: 14px;
    height: 14px;
}

.masthead-panel__app {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(78, 93, 134, 0.35);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.masthead-panel__app-title {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masthead-panel__app img {
    width: 18px;
    height: auto;
    flex-shrink: 0;
}

.masthead-panel__stores {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(78, 93, 134, 0.35);
}

.masthead-panel__stores a {
    display: flex;
}

.masthead-panel__stores img {
    width: 14px;
    height: auto;
}

.masthead-panel__lang {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: rgba(78, 93, 134, 0.35);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.masthead-panel__lang img {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* main bar */
.masthead-panel__bar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav actions";
    align-items: center;
    gap: 16px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d273e 0%, #141b2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.masthead-panel__brand {
    grid-area: brand;
    display: flex;
    width: 64px;
    flex-shrink: 0;
    padding: 4px;
}

.masthead-panel__brand-img {
    width: 100%;
    height: auto;
}

.masthead-panel__nav {
    grid-area: nav;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.masthead-panel__tabs {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
}

.masthead-panel__tabs::-webkit-scrollbar {
    display: none;
}

.masthead-tabs__list {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.masthead-tabs__item {
    flex-shrink: 0;
}

.masthead-tabs__link {
    display: block;
    padding: 8px 16px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.masthead-tabs__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.masthead-tabs__item.current-menu-item .masthead-tabs__link {
    color: #fff;
    background: rgba(0, 149, 255, 0.28);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(0, 149, 255, 0.35);
}

.masthead-panel__actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.masthead-panel__signin {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.masthead-panel__signin:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.masthead-panel__signup {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    background: linear-gradient(70deg, #31bc69, #089e4e);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.masthead-panel__signup-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 1200px) {
    .masthead-panel__body {
        gap: 8px;
        padding: 8px 0 10px;
    }

    .masthead-panel__meta {
        gap: 8px;
        min-height: 0;
    }

    .masthead-panel__meta-right {
        gap: 6px;
    }

    .masthead-panel__reward {
        max-width: 160px;
        height: 26px;
        font-size: 10px;
    }

    .masthead-panel__app-title {
        max-width: 90px;
    }

    .masthead-panel__bar {
        top: 0;
        z-index: 100;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "brand actions"
            "nav nav";
        gap: 8px 10px;
        min-height: 0;
        padding: 8px 10px 10px;
        border-radius: 12px;
    }

    .masthead-panel__brand {
        width: 52px;
        padding: 2px;
    }

    .masthead-panel__nav {
        justify-content: stretch;
        margin: 0 -2px;
    }

    .masthead-panel__tabs {
        width: 100%;
        padding: 3px;
    }

    .masthead-tabs__link {
        padding: 7px 12px;
        font-size: 12px;
    }

    .masthead-panel__actions {
        justify-content: flex-end;
        gap: 8px;
    }

    .masthead-panel__signin,
    .masthead-panel__signup {
        font-size: 12px;
        height: 34px;
        padding: 0 10px;
    }
}

@media (max-width: 760px) {
    .masthead-panel__body {
        gap: 6px;
        padding: 6px 0 8px;
    }

    .masthead-panel__meta {
        flex-wrap: wrap;
    }

    .masthead-panel__meta-right {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .masthead-panel__app,
    .masthead-panel__stores {
        display: none;
    }

    .masthead-panel__bar {
        padding: 8px;
        gap: 6px 8px;
    }

    .masthead-tabs__link {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .masthead-panel__meta {
        display: none;
    }

    .masthead-panel__body {
        gap: 0;
        padding: 0 0 8px;
    }

    .masthead-panel__signin {
        display: none;
    }

    .masthead-panel__signup {
        font-size: 11px;
        height: 32px;
        padding: 0 8px;
    }

    .masthead-panel__signup-plus {
        width: 16px;
        height: 16px;
        margin-right: 4px;
        font-size: 12px;
    }
}
