/* 游戏页面样式 */

/* 游戏英雄区域 */
.game-hero {
    min-height: 60vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.game-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 300;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* 游戏选择区域 */
.game-selection {
    padding: 80px 0;
    background: #f8f9fa;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.game-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.game-card:hover::before {
    transform: scaleX(1);
}

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

.game-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.game-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.game-difficulty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.difficulty-label {
    font-weight: 500;
    color: #666;
}

.difficulty-stars {
    color: #ff6b6b;
}

.play-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* 游戏界面 */
.game-interface {
    padding: 80px 0;
    background: white;
    min-height: 70vh;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #333;
}

.game-info {
    display: flex;
    gap: 2rem;
    font-weight: 500;
}

.game-info span {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    color: #666;
}

.back-btn {
    background: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #555;
    transform: translateY(-2px);
}

/* 音乐记忆游戏 */
.memory-game-board {
    text-align: center;
}

.memory-instructions {
    margin-bottom: 2rem;
}

.memory-instructions p {
    font-size: 1.2rem;
    color: #666;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.memory-cell {
    aspect-ratio: 1;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.memory-cell.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    transform: scale(1.1);
}

.memory-cell.correct {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    animation: pulse 0.5s ease;
}

.memory-cell.wrong {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    animation: shake 0.5s ease;
}

.memory-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.start-memory-btn,
.repeat-memory-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.start-memory-btn:hover,
.repeat-memory-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.start-memory-btn:disabled,
.repeat-memory-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 舞蹈节奏游戏 */
.rhythm-game-board {
    text-align: center;
}

.rhythm-instructions {
    margin-bottom: 2rem;
}

.rhythm-instructions p {
    font-size: 1.2rem;
    color: #666;
}

.rhythm-track {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.rhythm-lane {
    height: 200px;
    position: relative;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 10px;
    overflow: hidden;
}

.rhythm-block {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
    animation: slideDown 2s linear;
}

.rhythm-controls {
    margin-top: 2rem;
}

.dance-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 200px;
    margin: 0 auto;
}

.dance-btn {
    aspect-ratio: 1;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dance-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
}

.dance-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    transform: scale(1.1);
    animation: pulse 0.3s ease;
}

/* 知识问答游戏 */
.trivia-game-board {
    max-width: 800px;
    margin: 0 auto;
}

.trivia-question {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
}

.trivia-question h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.trivia-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.trivia-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1.1rem;
}

.trivia-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.trivia-option.selected {
    border-color: #667eea;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.trivia-option.correct {
    border-color: #4ecdc4;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.trivia-option.wrong {
    border-color: #ff6b6b;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.trivia-controls {
    text-align: center;
}

.next-trivia-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.next-trivia-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.next-trivia-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 游戏结果弹窗 */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

.modal-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.modal-stats {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.modal-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-label {
    font-weight: 500;
    color: #666;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff6b6b;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes slideDown {
    from { top: -60px; }
    to { top: 100%; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 1.5rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
        text-align: center;
    }
    
    .game-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 400px;
    }
    
    .dance-buttons {
        max-width: 150px;
    }
    
    .modal-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .game-hero {
        padding: 100px 0 60px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-subtitle {
        font-size: 1.1rem;
    }
    
    .game-card {
        padding: 2rem;
    }
    
    .memory-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }
    
    .rhythm-lane {
        height: 150px;
    }
    
    .rhythm-block {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}
