:root {
    --cy-accent: #ff5a1f;
    --cy-accent-strong: #e64910;
    --cy-accent-soft: #fff1ea;
    --cy-bg: #f6f6f4;
    --cy-surface: #ffffff;
    --cy-border: #ebe5df;
    --cy-text: #1f1a17;
    --cy-soft: #5e5650;
    --cy-muted: #92877d;
    --cy-shadow: 0 10px 24px rgba(31, 26, 23, 0.06);
    --cy-radius: 16px;
    --cy-title-font: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.cy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.cy-main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

.cy-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 84px;
}

.cy-logo-area {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.cy-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.subsite-brand-link {
    gap: 0;
    flex-shrink: 0;
}

.subsite-brand-wordmark {
    display: block;
    width: auto;
    height: 52px;
    object-fit: contain;
}

.cy-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff7646, #ff4f14);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 10px 20px rgba(255, 90, 31, 0.22);
}

.cy-logo-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cy-logo-copy strong {
    color: var(--cy-text);
    font-family: var(--cy-title-font);
    font-size: 22px;
    line-height: 1.2;
}

.cy-logo-copy span {
    color: var(--cy-muted);
    font-size: 12px;
    line-height: 1.4;
}

.cy-platform-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.cy-platform-nav::-webkit-scrollbar,
.cy-category-nav::-webkit-scrollbar {
    display: none;
}

.cy-platform-nav a {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--cy-soft);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.cy-platform-nav a:hover,
.cy-platform-nav a.active {
    background: var(--cy-accent-soft);
    color: var(--cy-accent-strong);
}

.cy-search-area {
    flex: 1;
    min-width: 0;
    max-width: 520px;
    margin-left: auto;
}

.cy-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 4px 0 14px;
    border: 2px solid rgba(255, 90, 31, 0.95);
    border-radius: 999px;
    background: #fff8f5;
}

.cy-search-box i {
    color: #94857b;
    font-size: 16px;
    flex-shrink: 0;
}

.cy-search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--cy-text);
    font-size: 15px;
}

.cy-search-box button {
    flex-shrink: 0;
    height: 36px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff6d39, #ff4f14);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cy-user-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 108px;
}

.cy-user-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cy-soft);
    font-size: 13px;
    font-weight: 600;
}

.cy-user-link:hover {
    color: var(--cy-accent-strong);
}

.cy-user-avatar,
.cy-user-avatar-img {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--cy-accent-soft);
    color: var(--cy-accent-strong);
    overflow: hidden;
}

.cy-user-avatar-img {
    object-fit: cover;
}

.cy-channel-shell {
    background: var(--cy-surface);
    border-bottom: 1px solid var(--cy-border);
}

.cy-channel-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.cy-category-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 36px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.cy-category-nav a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--cy-soft);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.cy-category-nav a:hover,
.cy-category-nav a.active {
    background: rgba(255, 90, 31, 0.12);
    color: var(--cy-accent-strong);
}

.cy-nav-control {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 34px;
    border: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
    color: #7f7369;
    cursor: pointer;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
}

.cy-nav-control.right {
    right: 0;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.cy-nav-control.left {
    left: 0;
}

@media (max-width: 900px) {
    .cy-header-content {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand brand"
            "search user";
        gap: 12px 16px;
        padding: 12px 0;
        min-height: 0;
    }

    .cy-logo-area {
        grid-area: brand;
        display: grid;
        gap: 10px;
    }

    .cy-user-actions {
        grid-area: user;
        min-width: 34px;
        align-self: center;
    }

    .cy-search-area {
        grid-area: search;
        max-width: none;
        width: auto;
        margin-left: 0;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .cy-container {
        padding: 0 12px;
    }

    .cy-main-header {
        position: static;
    }

    .cy-header-content {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand brand"
            "search user";
        gap: 10px 10px;
    }

    .cy-logo-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 18px;
    }

    .subsite-brand-wordmark {
        height: 40px;
    }

    .cy-logo-copy strong {
        font-size: 18px;
    }

    .cy-logo-copy span {
        font-size: 11px;
    }

    .cy-platform-nav a {
        padding: 6px 10px;
        font-size: 12px;
    }

    .cy-search-box {
        height: 42px;
        padding-left: 12px;
    }

    .cy-search-box input {
        font-size: 14px;
    }

    .cy-search-box button {
        height: 34px;
        padding: 0 12px;
    }

    .cy-user-text {
        display: none;
    }

    .cy-user-actions {
        min-width: 34px;
    }

    .cy-user-link {
        gap: 0;
    }

    .cy-category-nav {
        padding: 8px 12px;
        gap: 6px;
    }

    .cy-category-nav a {
        padding: 7px 12px;
        font-size: 12px;
    }

    .cy-nav-control {
        display: none !important;
    }
}
