/* 游戏页面样式 */

/* 游戏英雄区域 */
.game-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.game-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* 游戏容器 */
.games-container {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
}

/* 游戏卡片 */
.game-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.game-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    text-align: center;
}

.game-header h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.game-header p {
    opacity: 0.9;
    line-height: 1.6;
}

.game-content {
    padding: 40px 30px;
}

/* 时间感知游戏 */
.timer-display {
    text-align: center;
    margin-bottom: 30px;
}

#perception-timer {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 记忆游戏 */
.memory-display {
    text-align: center;
    margin-bottom: 30px;
}

#memory-numbers {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.memory-number {
    width: 60px;
    height: 60px;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.memory-number:hover {
    transform: scale(1.1);
    background: #5a6fd8;
}

.memory-number.selected {
    background: #28a745;
}

.memory-number.correct {
    background: #28a745;
}

.memory-number.wrong {
    background: #dc3545;
}

#memory-input {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.memory-input-btn {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.memory-input-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.memory-input-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 快速点击游戏 */
.click-display {
    text-align: center;
    margin-bottom: 30px;
}

.click-timer {
    font-size: 3rem;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.click-target {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    font-weight: 600;
    user-select: none;
}

.click-target:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.click-target:active {
    transform: scale(0.95);
}

.click-score {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* 颜色匹配游戏 */
.color-display {
    text-align: center;
    margin-bottom: 30px;
}

.color-timer {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff8c00;
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 0 auto 20px;
}

.color-cell {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-cell:hover {
    transform: scale(1.1);
    border-color: #333;
}

.color-cell.selected {
    border-color: #333;
    transform: scale(1.1);
}

.color-cell.matched {
    opacity: 0.5;
    pointer-events: none;
}

.color-score {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

/* 游戏控制按钮 */
.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-btn {
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.game-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.game-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.game-btn.reset {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.game-btn.reset:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

/* 游戏结果 */
.game-result {
    text-align: center;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 20px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-result.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 2px solid #28a745;
}

.game-result.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 2px solid #dc3545;
}

.game-result.info {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 2px solid #007bff;
}

/* 排行榜区域 */
.leaderboard-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.leaderboard-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #333;
    font-weight: 700;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.leaderboard-content {
    max-width: 800px;
    margin: 0 auto;
}

.tab-content {
    display: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #e9ecef);
    color: #333;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #d4a574);
    color: white;
}

.rank-number {
    font-weight: 700;
    font-size: 1.2rem;
}

.player-name {
    font-weight: 600;
}

.player-score {
    font-weight: 700;
    color: #667eea;
}

/* 游戏技巧区域 */
.game-tips {
    padding: 60px 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.game-tips h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.tip-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.tip-item h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.tip-item p {
    opacity: 0.9;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }

    .game-subtitle {
        font-size: 1.1rem;
    }

    .games-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 15px;
    }

    .game-header h3 {
        font-size: 1.5rem;
    }

    .game-content {
        padding: 30px 20px;
    }

    #perception-timer {
        font-size: 3rem;
    }

    .click-target {
        width: 120px;
        height: 120px;
        font-size: 1rem;
    }

    .color-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 240px;
    }

    .color-cell {
        width: 50px;
        height: 50px;
    }

    .leaderboard-tabs {
        gap: 5px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .leaderboard-section h2,
    .game-tips h2 {
        font-size: 2rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .game-controls {
        flex-direction: column;
        align-items: center;
    }

    .game-btn {
        width: 100%;
        max-width: 200px;
    }

    .memory-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .memory-input-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .click-target {
        width: 100px;
        height: 100px;
        font-size: 0.9rem;
    }

    .color-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 160px;
    }

    .color-cell {
        width: 40px;
        height: 40px;
    }
} 