/* ==================== 全屏背景视频容器 ==================== */
.hero-section {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
    background-color: #F2F3F5;
    display: flex;
    flex-direction: column;
}

/* 背景视频 */
.hero-section > #bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: opacity 0.5s ease;
}

.hero-section > #bg-video.loaded {
    opacity: 1 !important;
}

/* 视频加载占位 — 透明，不产生白色闪烁 */
.hero-section .video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
}

.hero-section > #bg-video.loaded ~ .video-placeholder {
    display: none;
}

/* 毛玻璃遮罩 — 替代纯色遮罩，视觉效果更柔和 */
.hero-section .overlay-blur {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-section .overlay-blur.visible {
    opacity: 1;
}

/* ==================== 左上角 Greeting ==================== */
.hero-section .greeting {
    position: absolute;
    top: clamp(24px, 3vw, 50px);
    left: clamp(24px, 3vw, 50px);
    z-index: 2;
    font-size: clamp(14px, 0.9vw, 18px);
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    font-weight: 400;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.hero-section .greeting.animate-in {
    opacity: 1;
}

/* ==================== 居中内容 ==================== */
.hero-section .hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px clamp(24px, 4vw, 60px);
    gap: clamp(16px, 2vw, 17px);
}

/* 姓名 + 副标题行 */
.hero-section .hero-title-row {
    display: flex;
    align-items: baseline;
    gap: clamp(10px, 1.5vw, 20px);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-section .name {
    font-size: clamp(40px, 5vw, 80px);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.hero-section .name.animate-in {
    opacity: 1;
}

.hero-section .name span {
    color: #e07a8a;
    position: relative;
    display: inline-block;
}

/* 一二 下方横线 */
.hero-section .name span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: clamp(2px, 0.25vw, 4px);
    background: linear-gradient(90deg, #e07a8a 0%, #ffb8c4 50%, #e07a8a 100%);
    border-radius: 2px;
}

.hero-section .subtitle {
    font-size: clamp(13px, 1.2vw, 22px);
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.hero-section .subtitle.animate-in {
    opacity: 1;
}

/* ==================== 打字机效果 ==================== */
.hero-section .typewriter {
    font-size: clamp(14px, 1.2vw, 20px);
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    min-height: 4.8em;
    line-height: 1.6;
    text-align: center;
    max-width: 700px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-section .typewriter::after {
    content: '|';
    animation: blink 0.7s step-end infinite;
    color: #e07a8a;
    font-weight: 700;
}

/* 打字机未开始时隐藏光标 */
.hero-section .typewriter:not(.typing)::after {
    content: none;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ==================== 社交按钮 ==================== */
.hero-section .social-links {
    display: flex;
    gap: clamp(10px, 0.8vw, 16px);
    position: relative;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-section .social-btn {
    width: clamp(38px, 2.5vw, 48px);
    height: clamp(38px, 2.5vw, 48px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    position: relative;
    overflow: hidden;
    opacity: 0; /* JS 清除内联后由 animate-in 过渡 */
}

.hero-section .social-btn.animate-in {
    opacity: 1;
}

.hero-section .social-btn:hover {
    transform: translateY(-4px) scale(1.1);
    background: #fff;
    color: #e07a8a;
    border-color: #fff;
    box-shadow: 0 8px 30px rgba(224, 122, 138, 0.3);
}

.hero-section .social-btn:active {
    transform: translateY(-1px) scale(0.95);
}

.hero-section .social-btn svg {
    width: clamp(18px, 1.5vw, 24px);
    height: clamp(18px, 1.5vw, 24px);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.hero-section .social-btn:hover svg {
    transform: scale(1.15);
}

/* ==================== 下拉面板 ==================== */
.hero-section .social-dropdown-wrapper {
    position: relative;
    height: 0;
    overflow: visible;
    width: 100%;
    transition: height 0.3s ease;
}

.hero-section .social-dropdown-wrapper.active {
    height: 44px;
    margin: 0px 0 20px 0;
}

.hero-section .social-dropdown {
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    border-radius: 12px;
    padding: 0;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    min-width: auto;
    width: auto;
    white-space: nowrap;
    z-index: 100;
    border: none;
}

.social-dropdown.active {
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 1;
    visibility: visible;
}

.social-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid rgba(30, 30, 50, 0.95);
}

.hero-section .social-dropdown {
    --arrow-position: 15px;
}

.social-dropdown::before {
    left: var(--arrow-position);
}

.hero-section .dropdown-panel {
    position: relative;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    display: none;
}

.dropdown-panel.active {
    opacity: 1;
    pointer-events: auto;
    display: block;
}

.hero-section .dropdown-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 4px 0;
    white-space: nowrap;
}

.hero-section .dropdown-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.hero-section .dropdown-value {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.btn-copy, .btn-action {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.hero-section .btn-copy {
    background: rgba(224, 122, 138, 0.2);
    color: #e07a8a;
}

.btn-copy:hover {
    background: #e07a8a;
    color: #fff;
}

.hero-section .btn-action {
    background: #e07a8a;
    color: #fff;
}

.btn-action:hover {
    background: #d6697a;
}

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    display: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

/* ==================== 滚动指示器 ==================== */
.hero-section .scroll-indicator {
    position: absolute;
    bottom: clamp(20px, 3vw, 40px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0;
}

.hero-section .scroll-indicator svg {
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.7);
}

.scroll-indicator.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.scroll-indicator.animate-in svg {
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero-section .scroll-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==================== 暗黑模式 ==================== */
html.dark .hero-section {
    background-color: #0A0A0A;
}

html.dark .hero-section .overlay-blur {
    background: rgba(0, 0, 0, 0.4);
}

html.dark .social-dropdown.active {
    background: rgba(15, 15, 25, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark .social-dropdown::before {
    border-bottom-color: rgba(15, 15, 25, 0.98);
}

html.dark .toast {
    background: rgba(0, 0, 0, 0.92);
}

/* ==================== 移动端 ==================== */
@media (max-width: 768px) {
    .hero-section {
        height: calc(100vh - 60px);
    }
    .hero-section .hero-content {
        padding: 60px 20px;
        gap: 14px;
    }
    .hero-section .hero-title-row {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    .hero-section .subtitle {
        font-size: clamp(12px, 3vw, 16px);
    }
    .hero-section .typewriter {
        font-size: clamp(12px, 2.5vw, 15px);
        min-height: 3.2em;
    }
    .hero-section .social-links {
        gap: 8px;
    }
    .hero-section .social-btn {
        width: 34px;
        height: 34px;
    }
    .hero-section .social-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ==================== 大屏幕适配 ==================== */
@media (min-width: 1920px) {
    .hero-section .hero-content {
        padding: 100px clamp(24px, 4vw, 120px);
        gap: clamp(16px, 2vw, 40px);
    }
    .hero-section .hero-title-row {
        gap: clamp(10px, 1.5vw, 30px);
    }
    .hero-section .greeting {
        font-size: clamp(14px, 0.9vw, 28px);
    }
    .hero-section .name {
        font-size: clamp(40px, 5vw, 140px);
    }
    .hero-section .subtitle {
        font-size: clamp(13px, 1.2vw, 36px);
    }
    .hero-section .typewriter {
        font-size: clamp(14px, 1.2vw, 30px);
        max-width: 1000px;
    }
    .hero-section .social-btn {
        width: clamp(38px, 2.5vw, 64px);
        height: clamp(38px, 2.5vw, 64px);
    }
    .hero-section .social-btn svg {
        width: clamp(18px, 1.5vw, 32px);
        height: clamp(18px, 1.5vw, 32px);
    }
}
