/* ====================================
   Global Styles – Dark Theme (mobile-ready v5)
   ==================================== */

/* 1. 强制深色模式 —— 不跟随系统切换 */
html { color-scheme: dark; }
@media (prefers-color-scheme: light) {
    :root {
        --bg-color:#1f2029; --text-color:#ffffff;
        --nav-bg:rgba(31,32,41,.7); --nav-text:#ffffff;  /* 确保按钮和菜单文字是白色 */
        --divider:rgba(255,255,255,.6);
        --card-bg:#26272f; --card-border:rgba(255,255,255,.08);
        --card-hover:rgba(255,255,255,.14);
    }
}

/* ===== Design tokens ===== */
:root {
    --header-height:48px; --header-height-mobile:56px;
    --bg-color:#1f2029;  --text-color:#ffffff;
    --nav-bg:rgba(31,32,41,.7); --nav-text:#ffffff;  /* 确保按钮和菜单文字是白色 */
    --divider:rgba(255,255,255,.6);
    --card-bg:#26272f; --card-border:rgba(255,255,255,.08);
    --card-hover:rgba(255,255,255,.14);
}

/* ===== Reset ===== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

/* ===== Base ===== */
html,body,#root{
    height:100%;max-width:100vw;overflow-x:hidden;
    scroll-behavior:smooth;
    scroll-snap-type:y mandatory;           /* PC 端保留吸附 */
    scroll-padding-top:var(--header-height);
    overscroll-behavior-y:contain;
    font-family:'Poppins',sans-serif;
    color:var(--text-color);background:var(--bg-color);
}

/* —— 移动端关闭吸附 & 橡皮筋 —— */
@media(max-width:768px){
    html,body{
        scroll-snap-type:none !important;
        overscroll-behavior-y:auto;
    }
}

/* ===== Section block ===== */
.main-section{
    height:100vh;min-height:100vh;
    width:100%;max-width:100vw;position:relative;
    scroll-snap-align:start;scroll-snap-stop:always;
}
.fullpage-clamp{overflow:hidden}

/* —— 尾部对齐点 —— */
.main-section>*:last-child,
.parallax-root>*:last-child{scroll-snap-align:end}

/* —— 移动端让区块随内容伸展 —— */
@media(max-width:768px){
    .main-section{height:auto}
}

/* ===== Header ===== */
.major-nav{
    position:fixed;inset:0 0 auto 0;z-index:1000;
    width:100%;max-width:100vw;height:var(--header-height);
    display:flex;align-items:center;justify-content:space-between;
    padding:0 1rem;background:var(--nav-bg);backdrop-filter:blur(8px);
}
.nav-logo{display:flex;align-items:center;overflow:hidden}
.nav-logo img{height:32px;margin-right:.5rem}
.vertical{width:1px;height:24px;background:var(--divider);margin-right:.5rem}
.nav{margin-left:auto}
.nav__links{list-style:none;display:flex;gap:1rem;align-items:center;font-size:.9rem}
.nav__link a{color:var(--nav-text);opacity:.8;text-decoration:none;transition:opacity .2s}
.nav__link a:hover,.nav__link.active a{opacity:1}

/* ---- 修复汉堡菜单按钮字体颜色和增大字体 ---- */
.mobile-menu-btn{
    display:none;background:none;border:none;font-size:2rem;color:var(--nav-text);cursor:pointer;z-index:1001;
}

/* ---- 确保汉堡菜单字体为白色，且增大字体大小（仅移动端） ---- */
@media(max-width:768px){
    .mobile-menu-btn {
        color: #ffffff; /* 强制设置字体为白色 */
        font-size: 0.5rem; /* 增大字体 */
        padding: 1rem;  /* 增加间距，使其更易点击 */
    }
}

/* ===== Hero / Parallax ===== */
.parallax-root,.hero-section{
    position:relative;width:100%;max-width:100vw;height:100vh;
    overflow:hidden;scroll-snap-align:start;scroll-snap-stop:always;
}
.parallax-root .bg-image,.background-image{
    position:absolute;inset:0;
    background-size:cover;background-position:center;background-repeat:no-repeat;
    will-change:opacity;
}

/* 背景模糊 —— 调整背景遮罩透明度和模糊效果 */
.parallax-root .dark-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18); /* 透明度调整 */
    backdrop-filter: blur(0px); /* 去除模糊，或减少模糊 */
}

.parallax-root .banner-content{
    position:relative;z-index:1;max-width:90%;margin:0 auto;
    display:flex;flex-direction:column;align-items:center;text-align:center;
    gap:1.25rem;padding:0 1rem;
}
.parallax-root h1{font-size:clamp(2.2rem,6vw,4rem);font-weight:900;text-transform:uppercase}
.parallax-root .tagline{font-size:clamp(1rem,3.5vw,1.8rem);opacity:.85}
.parallax-root .view-news-btn{
    padding:.9rem 2.4rem;font-size:1rem;border:none;border-radius:48px;
    background:rgba(255,255,255,.15);color:#fff;backdrop-filter:blur(6px);
    cursor:pointer;transition:transform .2s;
}
.parallax-root .view-news-btn:hover{transform:translateY(-2px) scale(1.04)}
.parallax-root .scroll-hint{
    position:absolute;bottom:2rem;width:100%;left:0;
    text-align:center;font-size:.85rem;opacity:.8;
}
.vrcorner-section .scroll-hint{display:none !important}

/* ===== Drawer ===== */
.drawer-menu{background:var(--bg-color);padding:20px}
.drawer-menu a{color:var(--text-color);font-size:1.2rem}

/* ===== Core / VR Corner 区块多行内容可滚 —— */
.vrcorner-section,.coretech-section,.main-section.coretech-section{
    height:auto !important;min-height:100vh !important;
    overflow-y:auto !important;overflow-x:hidden !important;
    scroll-snap-align:start !important;
}

/* ===== 链接强调色统一 ===== */
a{color:inherit}

/* ===== Media Queries ===== */
@media(max-width:768px){
    .major-nav{height:var(--header-height-mobile);padding:0 .75rem}
    .nav__links,.nav-logo{display:none}
    .mobile-menu-btn{display:block}
}

@media(max-width:450px){
    .parallax-root .banner-content{gap:1rem}
    .parallax-root .view-news-btn{padding:.7rem 1.8rem;font-size:.9rem}
}
/* 在你的全局 CSS（比如 src/index.css）或者模块化 CSS 中都行 */
.language-select {
    /* 确保底色透明，这样下面的文字颜色才有效 */
    background: transparent;
}

/* 触发器区域 */
.language-select .ant-select-selector {
    background: transparent !important;
    color: #ffffff !important;
}

/* 选中项文字 */
.language-select .ant-select-selection-item {
    color: #ffffff !important;
}
/* 让下拉菜单中的选项文字颜色变为白色 */
.language-select .ant-select-item-option {
    color: #ffffff !important; /* 使所有选项文字变成白色 */
}

.language-select .ant-select-item-option-content {
    color: #ffffff !important; /* 强制修改选项的内容文字颜色 */
}
/* 针对移动端的语言选择 */
@media (max-width: 768px) {
    .language-select .ant-select-item-option,
    .language-select .ant-select-item-option-content {
        color: #ffffff !important; /* 强制将非选中项文字颜色设为白色 */
    }

    /* 使已选项的文字颜色也白色 */
    .language-select .ant-select-selection-item {
        color: #ffffff !important;
    }
}

/* 覆盖下拉菜单选项文字颜色 */
.language-select .ant-select-item-option-content {
    color: #ffffff !important;
}

/* 下拉箭头也白一点 */
.language-select .ant-select-arrow {
    color: #ffffff !important;
}
/* 确保在移动端下拉菜单中的文字是白色 */
@media (max-width: 768px) {
    .language-select .ant-select-item-option,
    .language-select .ant-select-item-option-content {
        color: #ffffff !important;
    }

    /* 确保已选项文字是白色 */
    .language-select .ant-select-selection-item {
        color: #ffffff !important;
    }

    /* 让下拉框背景透明 */
    .language-select .ant-select-selector {
        background: transparent !important;
        color: #ffffff !important;
    }
}

/* 强制让下拉菜单的文字为白色 */
@media (max-width: 768px) {
    .language-select .ant-select-item-option {
        color: #ffffff !important; /* 让下拉项的文字为白色 */
    }

    .language-select .ant-select-item-option-content {
        color: #ffffff !important; /* 强制将下拉项内容文字设置为白色 */
    }

    /* 确保下拉框背景色和文字颜色为白色 */
    .language-select .ant-select-selector {
        background-color: #1f2029 !important;
        color: #ffffff !important;
    }

    /* 确保已选项的文字颜色为白色 */
    .language-select .ant-select-selection-item {
        color: #ffffff !important;
    }

    /* 如果下拉箭头需要改成白色 */
    .language-select .ant-select-arrow {
        color: #ffffff !important;
    }
}
/* 强制在移动端应用白色文字和背景色 */
@media (max-width: 768px) {
    /* 修改下拉项的文字颜色 */
    .language-select-dropdown .ant-select-item-option,
    .language-select-dropdown .ant-select-item-option-content {
        color: #ffffff !important;
    }

    /* 确保下拉框背景色和文字颜色为白色 */
    .language-select-dropdown .ant-select-selector {
        background-color: #1f2029 !important;
        color: #ffffff !important;
    }

    /* 确保已选项文字颜色为白色 */
    .language-select-dropdown .ant-select-selection-item {
        color: #ffffff !important;
    }
    /* 导航整体高度调整 */
    .major-nav{height:var(--header-height-mobile);padding:0 .75rem}

    /* 隐藏桌面版导航链接 */
    .nav__links{display:none !important}

    /* 恢复 nav-logo 并只保留第一张 logo，放大响应式显示 */
    .major-nav .nav-logo {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }
    .major-nav .nav-logo > img:nth-of-type(1) {
        display: block !important;
        /* 移动端放大，最小 6rem，最大 14rem，中间按 30vw */
        width: clamp(14rem, 30vw, 17rem) !important;
        height: auto;
    }
    .major-nav .nav-logo > img:nth-of-type(2),
    .major-nav .nav-logo > .vertical {
        display: none !important;
    }


}
