/* 基础样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e0e0e0;
    margin: 0;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* 头部样式 - 拟态风格 */
header {
    background: #e0e0e0;
    padding: 30px 40px;
    border-radius: 20px;
    margin: 20px 0;
    width: 90%;
    max-width: 1200px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 12px 12px 24px #bebebe, -12px -12px 24px #ffffff;
}

header:hover {
    box-shadow: 15px 15px 30px #bebebe, -15px -15px 30px #ffffff;
}

header h1 {
    margin: 0;
    font-size: 2.8em;
    font-weight: 700;
    color: #555;
    letter-spacing: -0.5px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航栏样式 - 拟态风格 */
nav {
    width: 90%;
    max-width: 1200px;
    margin: 0 0 30px 0;
}

nav ul {
    list-style-type: none;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    background: #e0e0e0;
    border-radius: 15px;
    box-shadow: inset 6px 6px 12px #bebebe, inset -6px -6px 12px #ffffff;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 12px 20px;
    background: #e0e0e0;
    border-radius: 25px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95em;
    white-space: nowrap;
    box-shadow: 4px 4px 8px #bebebe, -4px -4px 8px #ffffff;
}

nav ul li a:hover {
    box-shadow: 2px 2px 4px #bebebe, -2px -2px 4px #ffffff;
    transform: translateY(-1px);
    color: #333;
}

nav ul li a:active {
    box-shadow: inset 2px 2px 4px #bebebe, inset -2px -2px 4px #ffffff;
    transform: translateY(0);
}

/* 移动端导航响应式 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    nav ul li a {
        width: 200px;
        text-align: center;
    }
}

/* 轮播图样式 - 拟态风格 */
.carousel {
    width: 90%;
    max-width: 1200px;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 0 0 40px 0;
    background: #e0e0e0;
    box-shadow: 12px 12px 24px #bebebe, -12px -12px 24px #ffffff;
    transition: all 0.3s ease;
}

.carousel:hover {
    box-shadow: 15px 15px 30px #bebebe, -15px -15px 30px #ffffff;
}

.carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: block;
    border-radius: 20px;
}

.carousel img:first-child {
    opacity: 1;
}

@media (max-width: 768px) {
    .carousel {
        height: 250px;
        width: 95%;
    }
}

/* 轮播图控制按钮 - 拟态风格 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #e0e0e0;
    color: #555;
    border: none;
    width: 45px;
    height: 45px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    box-shadow: 6px 6px 12px #bebebe, -6px -6px 12px #ffffff;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    box-shadow: 4px 4px 8px #bebebe, -4px -4px 8px #ffffff;
    color: #333;
}

.carousel-btn:active {
    box-shadow: inset 4px 4px 8px #bebebe, inset -4px -4px 8px #ffffff;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 2px 2px 4px #bebebe, inset -2px -2px 4px #ffffff;
}

.dot.active {
    background: #667eea;
    transform: scale(1.2);
    box-shadow: 4px 4px 8px #bebebe, -4px -4px 8px #ffffff;
}

/* 内容区域样式 - 拟态风格 */
.content {
    width: 90%;
    max-width: 1200px;
    background: #e0e0e0;
    border-radius: 20px;
    padding: 40px;
    margin: 0 0 40px 0;
    line-height: 1.8;
    font-size: 1.1em;
    color: #555;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 12px 12px 24px #bebebe, -12px -12px 24px #ffffff;
}

.content:hover {
    box-shadow: 15px 15px 30px #bebebe, -15px -15px 30px #ffffff;
}

@media (max-width: 768px) {
    .content {
        width: 95%;
        padding: 25px;
    }
}

/* 菜单区域样式 - 拟态风格 */
.menu-section {
    width: 90%;
    max-width: 1200px;
    margin: 0 0 40px 0;
    text-align: center;
}

/* 菜单引导文本样式 */
.menu-guide {
    font-size: 1.5em;
    font-weight: 600;
    margin: 30px 0;
    color: #555;
    text-align: center;
}

/* 分类区域样式 */
.category-section {
    margin: 30px 0;
    background: #e0e0e0;
    border-radius: 25px;
    padding: 25px;
    box-shadow: inset 8px 8px 16px #bebebe, inset -8px -8px 16px #ffffff;
}

/* 分类标题样式 */
.category-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #555;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.category-icon {
    font-size: 1.3em;
    display: inline-block;
}

/* 按钮区域样式 - 拟态风格 */
.menu-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.menu-buttons button {
    padding: 18px 25px;
    background: #e0e0e0;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    font-weight: 500;
    color: #555;
    position: relative;
    overflow: hidden;
    box-shadow: 6px 6px 12px #bebebe, -6px -6px 12px #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.menu-buttons button:hover {
    box-shadow: 4px 4px 8px #bebebe, -4px -4px 8px #ffffff;
    transform: translateY(-1px);
    color: #333;
}

.menu-buttons button:active {
    box-shadow: inset 4px 4px 8px #bebebe, inset -4px -4px 8px #ffffff;
    transform: translateY(0);
}

/* 按钮图标样式 */
.btn-icon {
    font-size: 1.2em;
    display: inline-block;
}

.menu-buttons br {
    display: none; /* 隐藏HTML中的换行符，因为我们现在使用网格布局 */
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .category-section {
    margin: 20px 0;
        padding: 20px;
    }
    
    .menu-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .menu-buttons button {
        padding: 15px 20px;
        font-size: 0.95em;
    }
    
    .category-title {
        font-size: 1.1em;
    }
    
    .btn-icon, .category-icon {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .category-section {
        padding: 15px;
    }
    
    .menu-buttons {
        gap: 10px;
    }
    
    .menu-buttons button {
        padding: 12px 15px;
        font-size: 0.9em;
    }
}

/* 副标题样式 - 拟态风格 */
.subtitle {
    font-size: 2em;
    font-weight: 700;
    color: #555;
    margin-bottom: 20px;
    display: inline-block;
    letter-spacing: -0.5px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 触摸波纹效果样式 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.8s ease-out;
    pointer-events: none;
    z-index: 1000;
    width: 20px;
    height: 20px;
    transform-origin: center;
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* 加载动画样式 - 拟态风格 */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#loader.fade-out {
    opacity: 0;
}

/* 主加载容器 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* 波动圆圈动画 */
.loading-dots {
    display: flex;
    gap: 15px;
    align-items: center;
}

.loading-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
    box-shadow: 
        inset 4px 4px 8px #bebebe,
        inset -4px -4px 8px #ffffff,
        0 4px 8px rgba(102, 126, 234, 0.2);
    animation: loading-bounce 1.4s ease-in-out infinite both;
    will-change: transform, box-shadow;
    transform: translateZ(0); /* GPU加速 */
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

/* 中心旋转元素 */
.loading-spinner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e0e0e0;
    position: relative;
    box-shadow: 
        15px 15px 30px #bebebe,
        -15px -15px 30px #ffffff;
    animation: loading-rotate 2s linear infinite;
    will-change: transform;
    transform: translateZ(0); /* GPU加速 */
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    animation: loading-inner-rotate 1.5s ease-in-out infinite reverse;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: 50%;
    background: #e0e0e0;
    box-shadow: 
        inset 8px 8px 16px #bebebe,
        inset -8px -8px 16px #ffffff;
}

/* 加载文字 */
.loading-text {
    font-size: 1.1em;
    color: #555;
    font-weight: 500;
    letter-spacing: 2px;
    animation: loading-pulse 2s ease-in-out infinite;
}

.loading-brand {
    font-size: 1.5em;
    color: #777;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 进度指示器 */
.loading-progress {
    width: 200px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 
        inset 2px 2px 4px #bebebe,
        inset -2px -2px 4px #ffffff;
    position: relative;
}

.loading-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: -200px;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    animation: loading-progress-fill 2s ease-in-out infinite;
}

/* 动画关键帧 */
@keyframes loading-bounce {
    0%, 80%, 100% { 
        transform: scale(1);
        box-shadow: 
            inset 4px 4px 8px #bebebe,
            inset -4px -4px 8px #ffffff,
            0 4px 8px rgba(102, 126, 234, 0.2);
    }
    40% { 
        transform: scale(1.3);
        box-shadow: 
            inset 6px 6px 12px #bebebe,
            inset -6px -6px 12px #ffffff,
            0 6px 12px rgba(102, 126, 234, 0.4);
    }
}

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

@keyframes loading-inner-rotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(0.8); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes loading-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes loading-progress-fill {
    0% { left: -200px; }
    50% { left: 0px; }
    100% { left: 200px; }
}

/* 加载动画移动端响应式 */
@media (max-width: 768px) {
    .loading-container {
        gap: 25px;
        padding: 0 20px;
    }
    
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loading-spinner::after {
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    
    .loading-brand {
        font-size: 1.3em;
    }
    
    .loading-text {
        font-size: 1em;
        letter-spacing: 1px;
    }
    
    .loading-progress {
        width: 150px;
    }
    
    .loading-dot {
        width: 16px;
        height: 16px;
    }
    
    .loading-dots {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .loading-container {
        gap: 20px;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
    }
    
    .loading-spinner::after {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .loading-progress {
        width: 120px;
        height: 3px;
    }
    
    .loading-brand {
        font-size: 1.2em;
    }
    
    .loading-text {
        font-size: 0.9em;
    }
}

/* 已移除重复的轮播图按钮样式 */

/* 花瓣飘落效果样式 */
.petal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -50px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes falling {
    0% {
        transform: translateY(-50px) rotate(0deg) scale(0.8);
        opacity: 0.6;
    }
    25% {
        transform: translateY(25vh) rotate(90deg) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translateY(75vh) rotate(270deg) scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(0.7);
        opacity: 0.3;
    }
}

/* 特殊按钮样式 - 拟态风格 */
.menu-buttons button.special-btn {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    box-shadow: 8px 8px 16px #bebebe, -8px -8px 16px #ffffff;
}

.menu-buttons button.special-btn:hover {
    background: linear-gradient(145deg, #5a67d8, #6b46c1);
    box-shadow: 6px 6px 12px #bebebe, -6px -6px 12px #ffffff;
    transform: translateY(-1px);
    color: white;
}

.menu-buttons button.special-btn:active {
    box-shadow: inset 6px 6px 12px rgba(190, 190, 190, 0.3), inset -6px -6px 12px rgba(255, 255, 255, 0.3);
}

/* 小游戏按钮图标动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.game-icon {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 返回顶部按钮 - 拟态风格 */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 8px 8px 16px #bebebe, -8px -8px 16px #ffffff;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    visibility: hidden;
}

.back-to-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.back-to-top-btn:hover {
    box-shadow: 6px 6px 12px #bebebe, -6px -6px 12px #ffffff;
    transform: translateY(-2px);
}

.back-to-top-btn:active {
    box-shadow: inset 6px 6px 12px #bebebe, inset -6px -6px 12px #ffffff;
}

.back-to-top-btn span {
    font-size: 24px;
    color: #555;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* 简化动画效果 */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}