/* ==========================================================================
   QY 欢迎页：全屏背景图 + 毛玻璃浮层 + Hero / 搜索 / 时钟
   ==========================================================================
   设计目标：
   1. 把背景图压一档对比（暗渐变 + 彩色柔光斑），前景玻璃元素浮起来
   2. Hero 品牌区 + slogan：建立第一印象
   3. 中部 Bing 搜索框：玻璃质感
   4. 右下角玻璃时钟卡：实时 HH:mm + 日期 + 周
   5. 浮入动画：依次淡入，节奏感
*/

*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #0B0D17;
    overflow: hidden;
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
}

/* ---------------- 背景层 ---------------- */
#home-img {
    display: block;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    user-select: none;
    /* 整体微微提暗 + 略加饱和：给前景留出对比空间 */
    filter: brightness(0.78) saturate(1.08);
    /* 缩放幅度从 1.06 提到 1.18 + 平移更大，时长缩到 20s，让"远景拉近"更明显 */
    animation: img-zoom 20s ease-in-out infinite alternate;
    transform-origin: 50% 50%;
}
/* 底部更暗 + 顶部加一点冷色压顶，构造视觉景深 */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(11, 13, 23, 0.55) 0%, rgba(11, 13, 23, 0.18) 28%, rgba(11, 13, 23, 0.0) 50%, rgba(11, 13, 23, 0.62) 100%),
        radial-gradient(120% 80% at 50% 100%, rgba(0, 107, 230, 0.18) 0%, rgba(0, 107, 230, 0) 50%);
}
/* 三束柔光斑：营造"光从远处洒下来"的氛围；blur + opacity 让它柔到几乎不可察觉 */
.bg-glow {
    position: fixed;
    z-index: 2;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: glow-float 18s ease-in-out infinite alternate;
}
.glow-1 {
    width: 540px; height: 540px;
    top: -120px; left: -120px;
    background: radial-gradient(circle, rgba(99, 152, 255, 0.55) 0%, rgba(99, 152, 255, 0) 70%);
    animation-delay: 0s;
}
.glow-2 {
    width: 460px; height: 460px;
    bottom: -140px; right: -120px;
    background: radial-gradient(circle, rgba(255, 116, 200, 0.42) 0%, rgba(255, 116, 200, 0) 70%);
    animation-delay: -6s;
}
.glow-3 {
    width: 380px; height: 380px;
    top: 38%; left: 60%;
    background: radial-gradient(circle, rgba(80, 220, 200, 0.32) 0%, rgba(80, 220, 200, 0) 70%);
    animation-delay: -12s;
    opacity: 0.45;
}

@keyframes img-zoom {
    0%   { transform: scale(1.0)   translate(0, 0); }
    50%  { transform: scale(1.10)  translate(2%, 1.2%); }
    100% { transform: scale(1.18)  translate(-3%, -2%); }
}
@keyframes glow-float {
    0%   { transform: translate(0, 0)        scale(1);    }
    50%  { transform: translate(40px, -30px) scale(1.08); }
    100% { transform: translate(-30px, 30px) scale(0.95); }
}

/* 所有前景内容统一加 z-index 浮在叠层之上 */
#top-bar, .hero, #search, .clock-card { z-index: 20; }

/* ---------------- 顶栏 ---------------- */
#top-bar {
    position: fixed;
    top: 22px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fade-in-down 0.7s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#top-bar .top-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    color: #FFFFFF;
    font-size: 13.5px;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.25s;
}
#top-bar .top-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
}
#top-bar .top-btn:active { transform: translateY(0) scale(0.97); }
#top-bar .top-btn .layui-icon { font-size: 14px; }

/* 头像胶囊 */
#user-chip {
    display: none;
    align-items: center;
    height: 40px;
    padding: 4px 14px 4px 4px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}
#user-chip:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.55);
}
#user-chip #user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
#user-chip #user-name {
    font-size: 13.5px;
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#user-chip .layui-icon-down {
    margin-left: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
}

/* ---------------- 头像下拉菜单（qy-welcome-dropdown） ---------------- */
.layui-dropdown.qy-welcome-dropdown {
    margin-top: 8px;
    padding: 4px;
    min-width: 140px !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(20, 26, 48, 0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.28),
        0 16px 40px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}
.layui-dropdown.qy-welcome-dropdown:before { display: none; }
.layui-dropdown.qy-welcome-dropdown .layui-menu {
    background: transparent; margin: 0; padding: 0; border: none; box-shadow: none;
}
.layui-dropdown.qy-welcome-dropdown .layui-menu li {
    padding: 0 !important;
    margin: 2px 0;
    line-height: 1;
    border-radius: 8px;
    transition: background 0.18s;
}
.layui-dropdown.qy-welcome-dropdown .layui-menu li:hover,
.layui-dropdown.qy-welcome-dropdown .layui-menu li.layui-this {
    background: rgba(255, 255, 255, 0.16) !important;
}
.layui-dropdown.qy-welcome-dropdown .layui-menu li .layui-menu-body-title {
    margin: 0 !important;
    padding: 8px 16px !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    letter-spacing: 0.3px;
}
.layui-dropdown.qy-welcome-dropdown .layui-menu li:hover .layui-menu-body-title,
.layui-dropdown.qy-welcome-dropdown .layui-menu li.layui-this .layui-menu-body-title {
    color: #FFFFFF !important;
}

/* ---------------- Hero 品牌区 ---------------- */
.hero {
    position: fixed;
    top: 14%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #FFFFFF;
    pointer-events: none;
    user-select: none;
    animation: fade-in-up 0.9s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 1.2px;
    margin-bottom: 16px;
}
.hero-eyebrow .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #5EA5F5;
    box-shadow: 0 0 10px #5EA5F5;
    animation: dot-pulse 2.4s ease-in-out infinite;
}
.hero-title {
    margin: 0;
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 4px;
    line-height: 1.1;
    background: linear-gradient(135deg, #FFFFFF 0%, #B6CFFF 50%, #5EA5F5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 24px rgba(94, 165, 245, 0.3);
}
.hero-subtitle {
    margin: 12px 0 0;
    font-size: 14.5px;
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@keyframes dot-pulse {
    0%, 100% { transform: scale(1);   box-shadow: 0 0 10px #5EA5F5; }
    50%      { transform: scale(1.4); box-shadow: 0 0 18px #5EA5F5; }
}

/* ---------------- Bing 搜索框（位置下移给 hero 让空间） ---------------- */
#search {
    position: fixed;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    width: min(92vw, 640px);
    height: 60px;
    padding: 0 8px 0 24px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    backdrop-filter: blur(20px) saturate(130%);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.22),
        0 24px 56px rgba(0, 0, 0, 0.26);
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    animation: fade-in-up 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#search:hover {
    transform: translate(-50%, -50%) translateY(-2px);
}
#search:focus-within {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.28),
        0 28px 64px rgba(0, 107, 230, 0.32);
}
#search .search-icon {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 14px;
}
#search input {
    flex: 1 1 auto;
    height: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: #FFFFFF;
    font-family: inherit;
    letter-spacing: 0.3px;
}
#search input::placeholder { color: rgba(255, 255, 255, 0.6); }
#search button {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 26px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    /* 淡蓝玻璃：避免深蓝在亮背景下显得突兀，跟其他玻璃元素融合 */
    background: linear-gradient(135deg, rgba(94, 165, 245, 0.78) 0%, rgba(143, 195, 255, 0.78) 100%);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
    box-shadow:
        0 2px 6px rgba(94, 165, 245, 0.22),
        0 8px 20px rgba(94, 165, 245, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-family: inherit;
}
#search button:hover {
    background: linear-gradient(135deg, rgba(143, 195, 255, 0.88) 0%, rgba(180, 218, 255, 0.88) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow:
        0 4px 10px rgba(94, 165, 245, 0.28),
        0 12px 28px rgba(94, 165, 245, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
#search button:active { transform: scale(0.97); }

/* ---------------- 实时时钟卡 ----------------
   设计：
   1. 顶部 NOW eyebrow + 跳动小点：呼应 hero-eyebrow 的视觉语言
   2. HH:mm 用渐变文字 + 等宽数字，秒级抖动消除
   3. 日期 / 星期分两行清楚分隔，竖线分隔符代替点号
   4. transform-origin 右下，hover 微抬，不抢戏 */
.clock-card {
    position: fixed;
    bottom: 28px;
    right: 28px;
    min-width: 184px;
    padding: 16px 22px 14px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    color: #FFFFFF;
    text-align: right;
    user-select: none;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        0 18px 44px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    animation: fade-in-up 0.9s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    transform-origin: 100% 100%;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    overflow: hidden;
}
/* 顶部高光描边：模拟玻璃边缘反光 */
.clock-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.clock-card:hover {
    border-color: rgba(255, 255, 255, 0.42);
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.24),
        0 22px 50px rgba(94, 165, 245, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.clock-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}
.clock-eyebrow .clock-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #5EA5F5;
    box-shadow: 0 0 8px #5EA5F5;
    animation: dot-pulse 2.4s ease-in-out infinite;
}

.clock-time {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 2.5px;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    /* 渐变文字：与 hero-title 同款配方，建立视觉延续 */
    background: linear-gradient(135deg, #FFFFFF 0%, #DCEAFF 50%, #B6CFFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 18px rgba(94, 165, 245, 0.35);
}

.clock-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.8px;
}
/* 用细竖线代替原本的点号，更清爽 */
.clock-meta .clock-sep {
    display: inline-block;
    width: 1px;
    height: 11px;
    background: rgba(255, 255, 255, 0.32);
}

/* ---------------- 通用动画 ---------------- */
@keyframes fade-in-up {
    0%   { opacity: 0; transform: translate(-50%, calc(-50% + 18px)); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}
/* hero 不带 -50% 垂直偏移，单独一组 */
.hero { animation-name: fade-in-up-x; }
@keyframes fade-in-up-x {
    0%   { opacity: 0; transform: translateX(-50%) translateY(18px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fade-in-down {
    0%   { opacity: 0; transform: translateY(-12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
    .clock-card { bottom: 18px; right: 18px; padding: 12px 16px 10px; min-width: 160px; }
    .clock-time { font-size: 28px; letter-spacing: 1.8px; }
    .clock-eyebrow { font-size: 9.5px; letter-spacing: 1.5px; }
}
@media (max-width: 640px) {
    .hero { top: 9%; }
    .hero-title { font-size: 36px; letter-spacing: 2px; }
    .hero-subtitle { font-size: 12.5px; letter-spacing: 1.2px; }
    #search { top: 30%; height: 50px; padding: 0 6px 0 18px; }
    #search button { height: 38px; padding: 0 18px; font-size: 13px; }
    #search input { font-size: 15px; }
    #top-bar { top: 14px; right: 14px; gap: 8px; }
    #top-bar .top-btn { height: 36px; padding: 0 14px; font-size: 12.5px; }
    .clock-card { padding: 10px 14px 8px; min-width: 140px; }
    .clock-time { font-size: 22px; letter-spacing: 1.2px; }
    .clock-meta { font-size: 10.5px; gap: 8px; }
    .clock-eyebrow { font-size: 9px; }
}
