/* 全局样式 */
:root {
    --primary-color: #007aff;
    --primary-color-rgb: 0, 122, 255;
    --secondary-color: #5ac8fa;
    --background-color: #f9f8f0;
    --card-color: #ffffff;
    --text-color: #1d1d1f;
    --text-secondary: #86868b;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.loaded {
    opacity: 1;
}

.page-transition {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.page-transition.loaded {
    opacity: 1;
}

.page-transition.unloading {
    opacity: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background-color: #e5e5ea;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #d1d1d6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
header {
    padding: 60px 0 40px;
    text-align: center;
}

header h1 {
    font-size: 52px;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInDown 0.8s ease forwards;
}

header .subtitle {
    font-size: 22px;
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInDown 0.8s ease 0.2s forwards;
}

/* 游戏网格样式 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0 80px;
}

/* 游戏卡片样式 */
.game-card {
    background-color: var(--card-color);
    border-radius: 24px;
    padding: 35px 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: 1 / 1;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

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

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.game-card.clicked {
    transform: scale(0.95);
    opacity: 0.8;
}

.game-card .icon {
    font-size: 64px;
    margin-bottom: 25px;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    background-color: rgba(0, 122, 255, 0.1);
    transition: transform 0.3s ease;
}

.game-card .icon svg {
    width: 60%;
    height: 60%;
    transition: all 0.3s ease;
}

.game-card:hover .icon {
    transform: scale(1.1);
}

.game-card:hover .icon svg {
    transform: scale(1.1);
}

.game-card h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
}

.game-card p {
    font-size: 18px;
    color: var(--text-secondary);
    flex-grow: 1;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

/* 图标颜色 */
.reaction-icon {
    background-color: rgba(255, 149, 0, 0.1);
    color: #ff9500;
}

.number-icon {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

.visual-icon {
    background-color: rgba(88, 86, 214, 0.1);
    color: #5856d6;
}

.verbal-icon {
    background-color: rgba(255, 45, 85, 0.1);
    color: #ff2d55;
}

.typing-icon {
    background-color: rgba(175, 82, 222, 0.1);
    color: #af52de;
}

.sequence-icon {
    background-color: rgba(64, 156, 255, 0.1);
    color: #409cff;
}

/* 页脚样式 */
footer {
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeIn 0.8s ease 1s forwards;
}

/* 动画关键帧 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-card .icon {
        width: 100px;
        height: 100px;
        font-size: 56px;
    }
}

@media (max-width: 576px) {
    header h1 {
        font-size: 42px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        aspect-ratio: auto;
        padding: 30px 20px;
    }
    
    .game-card .icon {
        width: 90px;
        height: 90px;
        font-size: 48px;
        margin-bottom: 20px;
    }
    
    .game-card h2 {
        font-size: 24px;
    }
} 