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

body {
    font-family: 'Arial', sans-serif;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部标题 */
header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
    margin-bottom: 20px;
}

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.2em;
}

/* 动物展示区 */
.zoo-area {
    flex: 1;
    position: relative;
    background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 70%, #90EE90 70%, #90EE90 100%);
    margin: 0 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, #90EE90 0%, #7CB342 100%);
    border-radius: 0 0 20px 20px;
}

/* 动物样式 */
.animal {
    position: absolute;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: fadeIn 0.5s ease;
    user-select: none;
}

.animal:hover {
    transform: scale(1.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 底部控制栏 */
.control-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.volume-section, .timer-section, .button-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.volume-display, .timer-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.threshold-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.threshold-control label {
    font-size: 0.9em;
    color: #666;
}

input[type="range"] {
    width: 100px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
    background: #2196F3;
    color: white;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-secondary {
    background: #9E9E9E;
    color: white;
}

.btn-success {
    background: #4CAF50;
    color: white;
}

/* 设置面板 */
.settings-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 400px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.settings-panel h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    color: #666;
    font-weight: bold;
}

.animal-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.select-all-btn, .select-none-btn {
    padding: 5px 15px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.animal-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
}

.animal-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5em;
}

.animal-option:hover {
    border-color: #2196F3;
    background: #e3f2fd;
}

.animal-option.selected {
    border-color: #2196F3;
    background: #2196F3;
}

.setting-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* 音量提示 */
.volume-hint {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 1.1em;
    z-index: 2000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .control-bar {
        flex-direction: column;
        gap: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    .settings-panel {
        min-width: 300px;
    }

    .animal-options {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
}