/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #000;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    position: relative;
}

/* 视频背景 */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
}

/* 图片背景 */
.image-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 平板端修复 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        z-index: 10;
    }
    
    .video-background {
        z-index: -1;
    }
    
    .announcement-section {
        z-index: 1000;
    }
}

/* 头部 */
.header {
    padding: 70px 0 40px;
    text-align: center;
    color: #fff;
}

.header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.header p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* 菜单区域 */
.menu-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    width: 100%;
}

.menu-category {
    width: 100%;
    max-width: 900px;
    margin-bottom: 40px;
    animation: fadeIn 0.8s ease forwards;
}

.category-title {
    color: #667eea;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
}

.menu-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-card {
    backdrop-filter: none;
    border-radius: 15px;
    padding: 10px 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    display: inline-block;
    margin: 5px;
    white-space: nowrap;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.menu-card a {
    color: #fff;
    text-decoration: none;
    display: block;
}

.menu-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.menu-card p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.menu-card .btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.menu-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* 公告区域 */
.announcement-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.announcement-bar {
    background: rgba(255, 255, 0, 0.9);
    color: #333;
    padding: 10px 20px;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.announcement-content-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.announcement-content {
    display: inline-block;
    white-space: nowrap;
    animation: scroll 20s linear infinite;
    padding-left: 100%;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.announcement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    z-index: 2000;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
}

.announcement-popup h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #667eea;
}

.announcement-popup p {
    margin-bottom: 20px;
    line-height: 1.5;
}

.announcement-popup .close-btn {
    display: block;
    margin: 0 auto;
    background: #667eea;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.announcement-popup .close-btn:hover {
    background: #764ba2;
    transform: scale(1.05);
}

/* 底部 */
.footer {
    padding: 30px 0;
    text-align: center;
    color: #fff;
    opacity: 0.8;
    font-size: 14px;
}

.footer .footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.footer .footer-info p {
    margin: 0;
}

.footer .copyright {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 10px;
}

/* 密码输入弹窗 */
.password-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.password-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.password-container h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 20px;
}

.password-container input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.password-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.password-container .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-container .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.password-container .error {
    color: #ff4d4f;
    margin-top: 10px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
    
    .menu-grid {
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 28px;
    }
    
    .header p {
        font-size: 16px;
    }
    
    .menu-grid {
        gap: 10px;
    }
    
    .menu-card {
        padding: 10px 15px;
        margin: 3px;
    }
    
    .announcement-popup {
        width: 95%;
        padding: 20px;
    }
    
    .audio-control {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .footer {
        padding: 30px 0;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 60px 0 20px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .menu-section {
        padding: 20px 0;
    }
    
    .footer {
        padding: 20px 0;
        font-size: 12px;
    }
    
    .announcement-bar {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .menu-card h3 {
        font-size: 16px;
    }
    
    .audio-control {
        bottom: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .header {
        padding: 10px 0;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .menu-section {
        padding: 10px 0;
    }
    
    .footer {
        padding: 10px 0;
    }
    
    .menu-card {
        padding: 8px 12px;
        margin: 2px;
    }
    
    .menu-card h3 {
        font-size: 14px;
    }
    
    .audio-control {
        bottom: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 音频控制 */
.audio-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.audio-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 二维码区域 */
.qr-code-section {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 100;
}

.qr-code-container {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.qr-code-container img {
    max-width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.qr-code-container p {
    color: #fff;
    font-size: 12px;
    opacity: 0.8;
}

/* 移动端隐藏二维码 */
@media (max-width: 768px) {
    .qr-code-section {
        display: none;
    }
}

/* 横屏模式也隐藏二维码 */
@media (orientation: landscape) and (max-height: 500px) {
    .qr-code-section {
        display: none;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 选择文本样式 */
::selection {
    background: rgba(102, 126, 234, 0.5);
    color: #fff;
}

/* 禁用右键菜单 */
body {
    user-select: none;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card {
    animation: fadeIn 0.5s ease forwards;
}

.menu-card:nth-child(1) { animation-delay: 0.1s; }
.menu-card:nth-child(2) { animation-delay: 0.2s; }
.menu-card:nth-child(3) { animation-delay: 0.3s; }
.menu-card:nth-child(4) { animation-delay: 0.4s; }
.menu-card:nth-child(5) { animation-delay: 0.5s; }
.menu-card:nth-child(6) { animation-delay: 0.6s; }
