/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 动物展示区 */
.zoo-area {
    position: relative;
    height: 400px;
    background: #87CEEB;
    overflow: hidden;
}

.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30%;
    background: #90EE90;
    border-top: 2px solid #7CFC00;
}

.animal {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* 控制面板 */
.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.volume-control, .timer, .buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-control span, .timer span {
    font-weight: bold;
}

#threshold {
    width: 100px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.settings-btn {
    background: #17a2b8;
    color: white;
}

.pause-btn {
    background: #ffc107;
    color: #212529;
}

/* 设置面板模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
    animation: modalopen 0.4s;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close:hover {
    color: black;
}

.setting-group {
    margin: 20px 0;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

#animal-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.animal-option {
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    background: #f0f0f0;
    transition: all 0.2s;
}

.animal-option.selected {
    background: #4facfe;
    color: white;
    transform: scale(1.2);
}

.select-buttons {
    margin-top: 10px;
}

.select-buttons button {
    margin-right: 10px;
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background: #6c757d;
    color: white;
    cursor: pointer;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.save-btn {
    background: #28a745;
    color: white;
}

.reset-btn {
    background: #dc3545;
    color: white;
}

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

    .header h1 {
        font-size: 2rem;
    }

    .zoo-area {
        height: 300px;
    }
}