* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    color: #333;
    min-height: 100vh;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 32px;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-subtitle {
    font-size: 18px;
    color: #666;
    font-style: italic;
}

/* 年级选择器样式 */
.grade-selector {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.selector-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.selector-content h2 {
    color: #4ecdc4;
    font-size: 24px;
    margin-bottom: 10px;
}

.selector-content label {
    font-size: 18px;
    font-weight: bold;
    color: #555;
}

.selector-content select {
    width: 100%;
    max-width: 300px;
    padding: 15px;
    font-size: 18px;
    border: 3px solid #4ecdc4;
    border-radius: 15px;
    background-color: #f8f9fa;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.selector-content select:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

/* 按钮样式 */
.btn-primary {
    padding: 15px 30px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: bold;
    background: linear-gradient(135deg, #4ecdc4, #45b7aa);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(78, 205, 196, 0.4);
    letter-spacing: 1px;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* 游戏控制按钮容器 */
.game-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* 当前年级显示 */
.current-grade {
    font-size: 14px;
    font-weight: bold;
    color: #ff6b6b;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* 游戏内容样式 */
.game-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 进度条样式 */
.progress-bar {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    height: 30px;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7aa);
    border-radius: 12px;
    width: 10%;
    transition: width 0.5s ease;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-text {
    position: relative;
    z-index: 2;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

/* 诗词卡片样式 */
.poetry-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #ffd93d;
}

.poetry-title {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
}

.poetry-content {
    font-size: 22px;
    line-height: 2;
    text-align: center;
    white-space: pre-wrap;
    color: #333;
    font-family: 'STKaiti', 'KaiTi', '楷体', 'SimSun', serif;
    font-weight: 500;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.blank {
    display: inline-block;
    width: 120px;
    height: 40px;
    border-bottom: 4px dashed #ff6b6b;
    margin: 0 10px;
    vertical-align: middle;
    background-color: rgba(255, 107, 107, 0.1);
    border-radius: 5px;
    position: relative;
}

.blank::after {
    content: "___";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff6b6b;
    font-weight: bold;
}

/* 选项容器样式 */
.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.option-btn {
    padding: 20px;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 3px solid #dee2e6;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    color: #333;
}

.option-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: #4ecdc4;
}

.option-btn.correct {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border-color: #4caf50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    animation: correctPulse 0.5s ease;
}

.option-btn.incorrect {
    background: linear-gradient(135deg, #f44336, #da190b);
    color: white;
    border-color: #f44336;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
    animation: incorrectShake 0.3s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 提示容器样式 */
.hint-container {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 15px;
    font-size: 18px;
    text-align: center;
    display: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hint-container.correct {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 3px solid #28a745;
    display: block;
}

.hint-container.incorrect {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 3px solid #dc3545;
    display: block;
}

/* 结果容器样式 */
.result-container {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.5s ease;
}

.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.result-card h2 {
    color: #4ecdc4;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.score {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.stars-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 15px;
}

.star {
    width: 70px;
    height: 70px;
    background-image: url('../image/star.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.star.filled {
    filter: brightness(1);
    animation: starGlow 1s ease-in-out infinite alternate;
}

.star.empty {
    filter: brightness(0.3);
}

@keyframes starGlow {
    from {
        transform: scale(1);
        filter: brightness(1);
    }
    to {
        transform: scale(1.1);
        filter: brightness(1.2);
    }
}

.result-message {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b6b;
    text-align: center;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 15px;
    border: 2px dashed #ff6b6b;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 15px;
        margin: 0;
        min-height: 100vh;
    }
    
    .header {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .game-title {
        font-size: 28px;
    }
    
    .game-subtitle {
        font-size: 16px;
    }
    
    .grade-selector {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .selector-content h2 {
        font-size: 20px;
    }
    
    .selector-content select {
        padding: 12px;
        font-size: 16px;
    }
    
    .btn-primary {
        padding: 12px 25px;
        font-size: 18px;
    }
    
    .poetry-card {
        padding: 20px;
    }
    
    .poetry-title {
        font-size: 20px;
    }
    
    .poetry-content {
        font-size: 18px;
        line-height: 1.8;
        font-family: 'STKaiti', 'KaiTi', '楷体', 'SimSun', serif;
    }
    
    .blank {
        width: 100px;
        height: 35px;
    }
    
    .options-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .option-btn {
        padding: 15px;
        font-size: 16px;
    }
    
    .result-container {
        padding: 30px;
    }
    
    .result-card h2 {
        font-size: 28px;
    }
    
    .score {
        font-size: 20px;
    }
    
    .star {
        width: 60px;
        height: 60px;
    }
    
    .result-message {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 24px;
    }
    
    .poetry-content {
        font-size: 16px;
        line-height: 1.8;
        font-family: 'STKaiti', 'KaiTi', '楷体', 'SimSun', serif;
    }
    
    .blank {
        width: 80px;
        height: 30px;
    }
    
    .options-container {
        gap: 12px;
    }
    
    .option-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .star {
        width: 50px;
        height: 50px;
    }
}
