/* ============================================================
   douyin.html 首页 · 苹果风主题（浅色毛玻璃）
   与 douyin-apple.css 配合：apple.css 负责通用壳层，
   本文件负责首页专属区块（hero / 内容广场 / 视频舞台）。
   ============================================================ */

.main-content {
    flex: 1;
    width: min(1180px, calc(100% - 36px));
    max-width: none;
    margin: 0 auto;
    padding: 28px 0 56px;
}

/* ---------- 顶部快捷操作 / 账户菜单 ---------- */
.douyin-home-page .header-create-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    min-height: 38px;
    padding-block: 0 !important;
    line-height: 1;
    text-decoration: none;
}

.douyin-home-page .user-account {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.douyin-home-page .user-profile-button {
    height: 38px;
    line-height: 1;
}

.douyin-home-page .user-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    transform-origin: center;
    transition: transform .2s ease;
}

.douyin-home-page .user-profile-button[aria-expanded="true"] .user-chevron {
    transform: rotate(180deg);
}

.user-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1300;
    width: 238px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 15px;
    background: rgba(247, 250, 253, .82);
    box-shadow: 0 20px 48px rgba(31, 45, 61, .17), inset 0 1px 0 rgba(255, 255, 255, .86);
    backdrop-filter: blur(26px) saturate(1.2);
    -webkit-backdrop-filter: blur(26px) saturate(1.2);
    transform-origin: top right;
    animation: account-menu-in .18s ease-out both;
}

.user-account-menu[hidden] { display: none; }

.user-account-menu__summary {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.user-account-menu__avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, rgba(113, 91, 216, .9), rgba(61, 117, 230, .88));
    box-shadow: 0 8px 18px rgba(80, 95, 205, .2);
    font-size: 13px;
    font-weight: 750;
}

.user-account-menu__summary > span:last-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.user-account-menu__summary strong {
    overflow: hidden;
    color: #2c3d51;
    font-size: 13px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-account-menu__summary small { color: #8391a2; font-size: 11px; }
.user-account-menu__separator { height: 1px; margin: 5px 3px; background: rgba(112, 130, 151, .13); }

.user-account-menu__item {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    border: 0;
    border-radius: 10px;
    color: #51657a;
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    text-align: left;
}

.user-account-menu__item:hover,
.user-account-menu__item:focus-visible { background: rgba(255, 255, 255, .66); }
.user-account-menu__item--danger { color: #c44e5a; }

@keyframes account-menu-in {
    from { opacity: 0; transform: translateY(-5px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Hero ---------- */
.home-hero {
    position: relative;
    min-height: 320px;
    margin-bottom: 22px;
    padding: 48px 54px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    align-items: center;
    gap: 34px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 26px;
    background:
        radial-gradient(circle at 82% 28%, rgba(10, 132, 255, 0.10), transparent 30%),
        radial-gradient(circle at 66% 94%, rgba(94, 92, 230, 0.12), transparent 34%),
        rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.07), inset 0 1px rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.home-hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -180px;
    top: -250px;
    border: 1px solid rgba(10, 132, 255, 0.12);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(10, 132, 255, 0.03), 0 0 0 140px rgba(94, 92, 230, 0.02);
}

.hero-copy,
.hero-overview {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--apple-blue, #0a84ff);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
}

.hero-kicker span {
    width: 26px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #0a84ff, #5e5ce6);
}

.hero-copy h1 {
    max-width: 650px;
    margin: 0;
    color: #1d1d1f;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -.04em;
}

.hero-copy p {
    max-width: 635px;
    margin: 18px 0 0;
    color: #6e6e73;
    font-size: 15px;
    line-height: 1.8;
}

.hero-actions {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-actions a {
    min-height: 46px;
    padding: 11px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: .22s ease;
}

.hero-primary-action {
    color: #fff;
    border: 0;
    background: linear-gradient(135deg, #0a84ff, #5e5ce6);
    box-shadow: 0 10px 26px rgba(10, 132, 255, 0.32);
}

.hero-primary-action:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(10, 132, 255, 0.4);
}

.hero-primary-action span {
    font-size: 16px;
}

.hero-secondary-action {
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
}

.hero-secondary-action:hover {
    color: #0a84ff;
    border-color: rgba(10, 132, 255, 0.4);
    background: rgba(255, 255, 255, 0.9);
}

/* ---------- Hero 右侧概览 ---------- */
.hero-overview {
    min-height: 230px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.8), 0 10px 26px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.overview-orbit {
    position: relative;
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(10, 132, 255, 0.25);
    border-radius: 50%;
    box-shadow: 0 0 0 15px rgba(10, 132, 255, 0.04), 0 0 42px rgba(10, 132, 255, 0.12);
}

.overview-orbit::before,
.overview-orbit::after {
    content: "";
    position: absolute;
    inset: 14px -10px;
    border: 1px solid rgba(10, 132, 255, 0.2);
    border-radius: 50%;
    transform: rotate(55deg);
}

.overview-orbit::after {
    inset: -10px 14px;
    border-color: rgba(94, 92, 230, 0.22);
    transform: rotate(-55deg);
}

.overview-orbit > span {
    width: 65px;
    height: 65px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(145deg, #0a84ff, #5e5ce6);
    box-shadow: 0 12px 30px rgba(10, 132, 255, 0.35);
    font-size: 24px;
    font-weight: 800;
}

.overview-orbit i {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0a84ff;
    box-shadow: 0 0 10px rgba(10, 132, 255, 0.6);
}

.overview-orbit i:nth-of-type(1) { top: 4px; right: 18px; background: #0a84ff; }
.overview-orbit i:nth-of-type(2) { bottom: 10px; left: 10px; background: #5e5ce6; box-shadow: 0 0 10px rgba(94,92,230,.6); }
.overview-orbit i:nth-of-type(3) { right: -2px; bottom: 33px; background: #ff375f; box-shadow: 0 0 10px rgba(255,55,95,.55); }

.overview-copy {
    margin-top: 21px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.overview-copy strong {
    color: #1d1d1f;
    font-size: 15px;
}

.overview-copy span {
    color: #86868b;
    font-size: 11px;
    letter-spacing: .06em;
}

.overview-status {
    margin-top: 12px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #248a3d;
    border: 1px solid rgba(48, 209, 88, 0.3);
    border-radius: 999px;
    background: rgba(48, 209, 88, 0.1);
    font-size: 11px;
    font-weight: 600;
}

.overview-status span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #30d158;
    box-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
}

/* ---------- 内容广场 ---------- */
.feed-panel {
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.07), inset 0 1px rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
}

.feed-toolbar {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #86868b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
}

.feed-toolbar h2 {
    margin: 0;
    color: #1d1d1f;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.feed-tabs {
    padding: 4px;
    display: flex;
    gap: 4px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
}

.feed-tab {
    min-height: 36px;
    padding: 7px 16px;
    color: #6e6e73;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.feed-tab:hover {
    color: #1d1d1f;
}

.feed-tab.active {
    color: #1d1d1f;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* ---------- 视频舞台 ---------- */
.video-stage {
    position: relative;
    height: auto;
    min-height: 560px;
    aspect-ratio: 16 / 9;
    margin: 0;
    overflow: hidden;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    background: #000;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
    isolation: isolate;
}

.video-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .34) 0, transparent 22%, transparent 56%, rgba(0, 0, 0, .72) 100%);
}

.video-stage video {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

.video-stage-topline {
    position: absolute;
    top: 18px;
    left: 19px;
    right: 19px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.live-badge,
.video-counter {
    min-height: 30px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 11px;
    font-weight: 600;
}

.live-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #30d158;
    box-shadow: 0 0 9px rgba(48, 209, 88, 0.7);
}

.video-counter {
    color: rgba(245, 245, 247, 0.8);
    font-variant-numeric: tabular-nums;
}

.center-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: 74px;
    height: 74px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: opacity .2s, transform .2s, background .2s;
}

.center-play-button:hover {
    background: rgba(255, 255, 255, 0.34);
    transform: translate(-50%, -50%) scale(1.06);
}

.center-play-button span {
    width: 0;
    height: 0;
    margin-left: 5px;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
}

.center-play-button.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-copy-overlay {
    position: absolute;
    left: 27px;
    right: 120px;
    bottom: 28px;
    z-index: 4;
    pointer-events: none;
}

.video-topic {
    display: inline-block;
    margin-bottom: 8px;
    color: #7fd4ff;
    font-size: 12px;
    font-weight: 700;
}

.video-copy-overlay h3 {
    max-width: 680px;
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 2.4vw, 30px);
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.02em;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
}

.video-copy-overlay p {
    margin: 8px 0 0;
    color: rgba(245, 245, 247, 0.72);
    font-size: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.video-action-rail {
    position: absolute;
    right: 20px;
    top: 50%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 9px;
    transform: translateY(-50%);
}

.video-action-rail button {
    width: 56px;
    min-height: 57px;
    padding: 7px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.32);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    transition: .2s;
}

.video-action-rail button:hover {
    color: #fff;
    background: rgba(10, 132, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateX(-2px);
}

.video-action-rail button span {
    font-size: 18px;
    line-height: 1;
}

.video-action-rail button small {
    font-size: 10px;
}

.video-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    height: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
}

.video-progress-track span {
    width: 16.666%;
    height: 100%;
    display: block;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, #0a84ff, #64d2ff);
    transition: width .35s ease;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: 1fr;
    }
    .hero-overview {
        min-height: 180px;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0 22px;
    }
    .overview-orbit {
        grid-row: span 2;
    }
    .overview-copy {
        margin: 0;
        align-items: flex-start;
    }
    .overview-status {
        justify-self: start;
    }
    .video-stage {
        min-height: 460px;
    }
}

@media (max-width: 640px) {
    .header-content {
        width: 100%;
        height: 64px;
        padding: 0 13px;
    }
    .header-create-link,
    .notification-button,
    .logo-copy span,
    .user-chevron {
        display: none;
    }
    .logo-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }
    .logo-copy strong {
        font-size: 15px;
    }
    .user-profile-button {
        max-width: 124px;
        padding-right: 9px;
    }
    .user-profile-button #loginspan {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .main-content {
        width: 100%;
        padding: 14px 10px calc(30px + env(safe-area-inset-bottom));
    }
    .home-hero {
        min-height: 0;
        margin-bottom: 12px;
        padding: 30px 22px 26px;
        gap: 26px;
        border-radius: 21px;
    }
    .home-hero::before {
        right: -350px;
    }
    .hero-copy h1 {
        font-size: clamp(30px, 9vw, 42px);
        line-height: 1.16;
    }
    .hero-copy p {
        margin-top: 14px;
        font-size: 13px;
    }
    .hero-actions {
        margin-top: 21px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .hero-actions a {
        min-height: 44px;
        padding: 10px 11px;
        gap: 7px;
        font-size: 12px;
    }
    .hero-overview {
        min-height: 136px;
        padding: 17px;
        grid-template-columns: auto 1fr;
        gap: 0 18px;
        border-radius: 17px;
    }
    .overview-orbit {
        width: 82px;
        height: 82px;
    }
    .overview-orbit > span {
        width: 49px;
        height: 49px;
        border-radius: 16px;
        font-size: 18px;
    }
    .overview-copy strong { font-size: 13px; }
    .overview-copy span { font-size: 10px; }
    .feed-panel {
        padding: 14px;
        border-radius: 21px;
    }
    .feed-toolbar {
        margin-bottom: 13px;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
    .feed-toolbar h2 { font-size: 19px; }
    .feed-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border-radius: 14px;
    }
    .feed-tab {
        min-width: 0;
        padding: 7px 5px;
    }
    .video-stage {
        min-height: 0;
        aspect-ratio: 9 / 14;
        border-radius: 17px;
    }
    .center-play-button {
        width: 62px;
        height: 62px;
    }
    .video-stage-topline {
        top: 13px;
        left: 13px;
        right: 13px;
    }
    .video-copy-overlay {
        left: 17px;
        right: 78px;
        bottom: 26px;
    }
    .video-copy-overlay h3 {
        font-size: 20px;
    }
    .video-copy-overlay p {
        display: none;
    }
    .video-action-rail {
        right: 11px;
    }
    .video-action-rail button {
        width: 50px;
        min-height: 53px;
        border-radius: 15px;
    }
}

@media (max-width: 390px) {
    .hero-actions {
        grid-template-columns: 1fr;
    }
    .hero-overview {
        display: flex;
    }
    .overview-copy,
    .overview-status {
        display: none;
    }
    .feed-tab {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
