/* /css/main.css */

/* 1. 基础重置与背景 */
body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #000;
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://bing.img.run/uhd.php');
    /* background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('https://api.miaomc.cn/image/get'); */

    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

/* 2. 导航栏 - 极致轻量化毛玻璃 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 50px;
    /* 统一高度，方便计算 */
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.menu-item {
    cursor: pointer;
    position: relative;
    padding: 0 20px;
    display: flex;
    align-items: center;
    color: white;
}

.menu-title {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.menu-item:hover .menu-title {
    color: #fff;
}

/* 3. 下拉内容 - 深色玻璃质感 (解决白色难看的问题) */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    /* 紧贴导航栏底部 */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 22, 0.9);
    backdrop-filter: blur(20px);
    min-width: 160px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.dropdown-content a {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background-color: #007aff;
    color: #fff;
}

.menu-item:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 4. 主容器与文案 */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0 20px;
    text-align: center;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: #fff;
    margin: 0 0 15px;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease-out;
}

p {
    font-size: clamp(1rem, 4vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 40px;
    font-weight: 300;
    animation: fadeInUp 1s ease-out;
}

/* 5. 按钮组 - 呼应管理页的描边感 */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    /* 手机端自动换行 */
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn:hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
    transform: translateY(-3px);
}

/* 6. 嵌入模式逻辑 - 保留你的原有结构 */
body.embed-mode {
    overflow: hidden !important;
    background-image: none !important;
    background-color: #f5f7fa !important;
    /* 切换为浅色背景适配后台 */
}

body.embed-mode .container> :not(.navbar):not(#iframe-container) {
    display: none !important;
}

/* 7. Iframe 容器 - 优化手机端滚动 */
#iframe-container {
    display: none;
    position: fixed;
    top: 50px;
    /* 对应 navbar 高度 */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 900;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

#iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 8. 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 9. 手机端细节优化 */
@media (max-width: 768px) {
    .navbar {
        justify-content: space-around;
        height: 50px;
    }

    .menu-item {
        padding: 0 10px;
    }

    .dropdown-content {
        left: 0;
        transform: none;
        width: 140px;
    }

    .btn {
        width: 80%;
        /* 手机端按钮更易点击 */
        max-width: 240px;
    }
}