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

body {
    font-family: 'Comic Sans MS', '微软雅黑', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    font-size: 20px; /* 增大基础字体大小 */
}

.game-container {
    max-width: 1200px; /* 增大最大宽度 */
    margin: 0 auto;
    padding: 30px; /* 增大内边距 */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-header {
    text-align: center;
    color: white;
    margin-bottom: 30px; /* 增大下边距 */
}

.game-header h1 {
    font-size: 4rem; /* 大幅增大标题字体 */
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    letter-spacing: 2px; /* 增加字间距 */
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 50px; /* 增大间距 */
    font-size: 2rem; /* 增大分数字体 */
    font-weight: bold;
}

.game-main {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px; /* 增大圆角 */
    padding: 40px; /* 增大内边距 */
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 30px; /* 增大间距 */
}

.question-area {
    text-align: center;
}

.question-text h2 {
    font-size: 3rem; /* 增大问题字体 */
    color: #4a5568;
    margin-bottom: 30px; /* 增大下边距 */
}

.objects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px; /* 增大物品间距 */
    margin: 30px 0;
    min-height: 200px; /* 增大最小高度 */
    align-items: center;
}

.object-item {
    width: 100px; /* 大幅增大物品尺寸 */
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem; /* 增大emoji大小 */
    cursor: grab;
    transition: all 0.3s ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    touch-action: manipulation;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.object-item:active {
    cursor: grabbing;
}

.object-item.dragging {
    position: fixed;
    z-index: 1000;
    transform: scale(1.2);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    pointer-events: none;
}

.object-item.dragged {
    opacity: 0.3;
    transform: scale(0.8);
}

/* 自由拖拽区域样式 */
.drag-area {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border: 6px solid #FFB74D;
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    text-align: center;
    min-height: 300px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 6px 20px rgba(255, 183, 77, 0.2);
    overflow: visible;
    z-index: 5;
    display: none;
}

.drag-area.dragging {
    background: linear-gradient(135deg, #fff3c4, #ffe082);
    border-color: #FFA726;
    border-width: 8px;
    box-shadow: 0 12px 35px rgba(255, 167, 38, 0.3);
}

.drag-counter {
    font-size: 24px;
    color: #E65100;
    font-weight: bold;
    background: white;
    padding: 12px 24px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: inline-block;
}

/* 可拖拽元素样式 */
.draggable-item {
    position: absolute !important;
    cursor: move;
    cursor: grab;
    cursor: -webkit-grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 15;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: element;
}

.draggable-item:active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 1000;
}

.draggable-item.dragging {
    transform: scale(1.15);
    box-shadow: 0 12px 35px rgba(0,0,0,0.4);
    z-index: 1001;
}

.draggable-item.clicked {
    opacity: 0.6;
    transform: scale(0.9);
}

.object-item:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.object-item.touched {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

.answer-area {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 15; /* 确保答案区域在拖拽区域之上 */
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 增大按钮最小宽度 */
    gap: 25px; /* 增大按钮间距 */
    max-width: 600px; /* 增大最大宽度 */
    width: 100%;
}

.answer-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    border-radius: 25px; /* 增大圆角 */
    padding: 30px; /* 增大内边距 */
    font-size: 2.5rem; /* 大幅增大字体 */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    touch-action: manipulation;
    min-height: 120px; /* 增大最小高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 100; /* 确保答案按钮在最高层 */
}

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

.answer-btn:active {
    transform: translateY(0);
}

.answer-btn.correct {
    background: linear-gradient(135deg, #2ed573, #1e90ff);
    animation: correctAnswer 0.6s ease;
}

.answer-btn.wrong {
    background: linear-gradient(135deg, #ff4757, #c44569);
    animation: wrongAnswer 0.6s ease;
    opacity: 0.7;
    cursor: pointer;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

@keyframes correctAnswer {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes wrongAnswer {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

.feedback-area {
    text-align: center;
    min-height: 100px; /* 增大最小高度 */
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    pointer-events: none; /* 确保反馈区域不会接收点击事件 */
}

.feedback-message {
    font-size: 2rem; /* 增大反馈字体 */
    font-weight: bold;
    padding: 25px; /* 增大内边距 */
    border-radius: 20px; /* 增大圆角 */
    margin-bottom: 20px; /* 增大下边距 */
}

.feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.next-btn {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border: none;
    border-radius: 25px; /* 增大圆角 */
    padding: 25px 40px; /* 增大内边距 */
    font-size: 2rem; /* 增大字体 */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    touch-action: manipulation;
    min-width: 200px; /* 增加最小宽度 */
    position: relative;
    z-index: 20;
    pointer-events: auto; /* 确保继续按钮可以接收点击事件 */
}

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

.game-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.sound-toggle, .reset-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    touch-action: manipulation;
}

.sound-toggle:hover, .reset-btn:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .game-main {
        padding: 20px;
    }
    
    .question-text h2 {
        font-size: 1.5rem;
    }
    
    .object-item {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .answer-btn {
        padding: 15px;
        font-size: 1.2rem;
        min-height: 60px;
    }
    
    .answer-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.5rem;
    }
    
    .score-board {
        font-size: 1rem;
        gap: 20px;
    }
    
    .question-text h2 {
        font-size: 1.3rem;
    }
    
    .object-item {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .answer-options {
        grid-template-columns: repeat(2, 1fr);
    }
}