/* =========================================
   1. 基础样式
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: rgba(255, 255, 255, 0.9);
    background-color: #000;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* =========================================
   2. 布局样式
   ========================================= */
.header {
    position: absolute;
    top: 30px;
    left: 40px;
    display: flex;
    align-items: center;
    background: transparent;
    z-index: 10;
}

.footer {
    position: fixed;
    bottom: 30px;
    left: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: transparent;
    padding: 15px;
    z-index: 10;
}

.button-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    width: 90%;
}

/* =========================================
   3. 组件样式
   ========================================= */
.header-icon { font-size: 48px; margin-right: 15px; color: rgba(255, 255, 255, 0.9); }
.header-title { font-size: 24px; font-weight: 600; letter-spacing: 1px; }

.footer-title { font-size: 16px; font-weight: 500; margin-bottom: 8px; color: rgba(255, 255, 255, 0.9); }
.footer-info { font-size: 14px; color: rgba(255, 255, 255, 0.7); line-height: 1.5;}
.footer-links { display: flex; gap: 15px; margin-bottom: 10px; margin-left: 4px;}
.footer-link { color: rgba(255, 255, 255, 0.7); font-size: 14px; text-decoration: none; transition: color 0.3s ease; position: relative; }
.footer-link:hover { color: rgba(255, 255, 255, 1); }
.footer-link::after { content: ''; position: absolute; width: 0; height: 1px; bottom: -2px; left: 0; background-color: rgba(255, 255, 255, 0.8); transition: width 0.3s ease; }
.footer-link:hover::after { width: 100%; }

/* 悬浮按钮 */
.floating-button { width: 200px; height: 240px; margin: 20px; perspective: 1000px; cursor: pointer; }
.button-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s; transform-style: preserve-3d; border-radius: 20px; }
.button-front, .button-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 25px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.button-front { background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.15); }
.button-back { background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.2); transform: rotateY(180deg); text-align: center; }
.button-icon { font-size: 48px; margin-bottom: 20px; color: rgba(255, 255, 255, 0.85); transition: all 0.3s ease; }
.button-title { font-size: 22px; font-weight: 600; margin-bottom: 10px; letter-spacing: 1px; text-align: center}
.button-description { font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.75); }

/* 菜单触发器 */
.menu-trigger { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); cursor: pointer; z-index: 100; transition: opacity 0.3s ease; }
.menu-trigger.hidden { opacity: 0; visibility: hidden; }
.menu-trigger i { font-size: 36px; color: rgba(255, 255, 255, 0.8); text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); transition: all 0.3s ease; }

/* 弹出菜单 */
.popup-menu { position: fixed; bottom: -100%; left: 50%; transform: translateX(-50%); width: 95%; max-width: 900px; height: 420px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(20px); border-radius: 25px 25px 0 0; z-index: 99; border: 1px solid rgba(255, 255, 255, 0.2); transition: bottom 0.4s ease; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3); }
.popup-menu.active { bottom: 0; }
.menu-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 25px 15px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.close-menu { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s ease; }
.menu-content { height: calc(100% - 85px); overflow-y: auto; padding: 20px 25px 40px; }
.menu-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.menu-item { display: flex; flex-direction: column; align-items: center; padding: 20px 15px; background: rgba(255, 255, 255, 0.08); border-radius: 15px; cursor: pointer; transition: all 0.3s ease; min-height: 140px; }
.menu-item-icon { font-size: 32px; margin-bottom: 15px; }

/* =========================================
   4. 动画样式
   ========================================= */
.floating-button:hover .button-inner { transform: rotateY(180deg) translateY(-10px); }
.floating-button:hover .button-icon { color: white; transform: scale(1.1); }
.menu-trigger:hover i { color: white; transform: translateY(-3px); }
.close-menu:hover { transform: rotate(90deg); }
.menu-item:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-5px); }

/* =========================================
   5. 响应式样式
   ========================================= */
@media (max-width: 768px) {
    .button-container { flex-direction: column; align-items: center; margin-top: 60px; }
    .floating-button { width: 80%; height: 120px; margin: 10px 0; }
    .button-front, .button-back { flex-direction: row; justify-content: flex-start; }
    .button-icon { margin-bottom: 0; margin-right: 20px; font-size: 32px; }
    .header, .footer { position: relative; margin: 20px auto; left: 0; text-align: center; align-items: center; }
    .menu-items { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .menu-items { grid-template-columns: repeat(2, 1fr); }
}

/* 滚动条美化 */
.menu-content::-webkit-scrollbar { width: 6px; }
.menu-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }