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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    width: 90vw;
    max-width: 1200px;
    height: 90vh;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 游戏头部 */
.game-header {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-header h1 {
    color: #8B4513;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    gap: 30px;
    font-size: 1.2em;
    font-weight: bold;
}

.game-info > div {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 15px;
    color: #2E8B57;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 游戏区域 */
.game-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.grass-field {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #87CEEB 0%, #98FB98 30%, #32CD32 100%);
    position: relative;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(34, 139, 34, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 139, 34, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(34, 139, 34, 0.2) 0%, transparent 50%);
}

/* 小黄鸡样式 */
.chicken {
    position: absolute;
    bottom: 80px;
    left: 50px;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
}

.chicken-body {
    font-size: 4em;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3));
    animation: chickenIdle 2s ease-in-out infinite alternate;
}

@keyframes chickenIdle {
    0% { transform: translateY(0px) rotate(-2deg); }
    100% { transform: translateY(-5px) rotate(2deg); }
}

.chicken.moving {
    animation: chickenWalk 0.5s ease-in-out;
}

@keyframes chickenWalk {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.chicken.eating {
    animation: chickenEat 0.6s ease-in-out;
}

@keyframes chickenEat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1); }
}

/* 零食样式 */
.snacks-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.snack {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: snackFloat 3s ease-in-out infinite;
}

.snack:hover {
    transform: scale(1.1);
}

.snack.targeted {
    animation: snackPulse 0.5s ease-in-out infinite alternate;
    transform: scale(1.2);
}

@keyframes snackFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes snackPulse {
    0% { 
        transform: scale(1.2);
        filter: brightness(1);
    }
    100% { 
        transform: scale(1.3);
        filter: brightness(1.2) drop-shadow(0 0 10px #FFD700);
    }
}

.snack-icon {
    font-size: 2.5em;
    margin-bottom: 5px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.snack-letter {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #8B4513;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid #FF8C00;
    min-width: 30px;
    text-align: center;
}

.snack.eaten {
    animation: snackEaten 0.6s ease-in-out forwards;
}

@keyframes snackEaten {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.5) rotate(180deg);
        opacity: 0.7;
    }
    100% { 
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* 输入区域 */
.input-area {
    background: linear-gradient(45deg, #F0F8FF, #E6E6FA);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.input-label {
    font-size: 1.2em;
    font-weight: bold;
    color: #4B0082;
}

#game-input {
    flex: 1;
    padding: 12px 20px;
    font-size: 1.3em;
    border: 3px solid #9370DB;
    border-radius: 25px;
    outline: none;
    background: white;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#game-input:focus {
    border-color: #FF6347;
    box-shadow: 0 0 15px rgba(255, 99, 71, 0.3);
    transform: scale(1.02);
}

.current-target {
    font-size: 1.2em;
    font-weight: bold;
    color: #FF6347;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 15px;
    min-width: 120px;
    text-align: center;
}

/* 游戏状态 */
.game-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    font-size: 1.5em;
    z-index: 100;
    display: none;
}

.game-status.show {
    display: block;
    animation: statusShow 0.5s ease-out;
}

@keyframes statusShow {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 控制按钮 */
.game-controls {
    background: #F5F5DC;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.game-controls button {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

#start-btn {
    background: linear-gradient(45deg, #32CD32, #228B22);
    color: white;
}

#pause-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #8B4513;
}

#restart-btn {
    background: linear-gradient(45deg, #FF6347, #FF4500);
    color: white;
}

#sound-btn {
    background: linear-gradient(45deg, #9370DB, #8A2BE2);
    color: white;
}

.game-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.game-controls button:active {
    transform: translateY(0px);
}

/* 成长效果 */
.chicken.growing {
    animation: chickenGrow 1s ease-in-out;
}

@keyframes chickenGrow {
    0% { transform: scale(1); }
    50% { 
        transform: scale(1.3);
        filter: brightness(1.5) drop-shadow(0 0 20px #FFD700);
    }
    100% { transform: scale(1); }
}

/* 粒子效果 */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #FFD700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 20;
}

.particle.star {
    background: #FFF;
    animation: particleTwinkle 1s ease-out forwards;
}

.particle.heart {
    background: #FF69B4;
    width: 8px;
    height: 8px;
}

@keyframes particleTwinkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* 连击效果 */
.combo-effect {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #FF6347, #FFD700);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 100;
    animation: comboShow 0.5s ease-out;
}

@keyframes comboShow {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
        font-size: 1em;
    }
    
    .input-area {
        flex-direction: column;
        gap: 10px;
    }
    
    .chicken-body {
        font-size: 3em;
    }
    
    .snack-icon {
        font-size: 2em;
    }
}
