/*
 * 进制理解可视化工具样式文件
 * Author: 王勇程 <laughskydragon@qq.com>
 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    user-select: none;
}

/* 容器样式 */
.container {
    max-width: 1600px; /* 增加最大宽度以适配宽屏 */
    margin: 0 auto;
    padding: 20px;
    width: 95%; /* 使用百分比宽度 */
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-radius: 15px;
}

.header h1 {
    color: #4a5568;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    color: #718096;
    font-size: 1.2em;
}

/* 页面标题 */
header {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

header h1 {
    color: #4a5568;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    color: #718096;
    font-size: 1.2em;
}

/* 模式切换 */
.mode-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 12px 24px;
    border: 2px solid #4299e1;
    background: transparent;
    color: #4299e1;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(66, 153, 225, 0.1);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: #4299e1;
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

/* 控制面板 */
.controls {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 230px; /* 减少到原来的一半 */
    max-height: 90vh; /* 接近窗口高度 */
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.controls:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}



/* 响应式设计：在小屏幕上恢复原来的布局 */
@media (max-width: 1200px) {
    .controls {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-height: none;
        margin-bottom: 20px;
    }
    
    .main-content {
        margin: 0 !important;
        margin-right: 0 !important;
        width: 100%;
    }
    
    /* 确保1200px以下时，所有展示区域宽度与主体宽度相同 */
    .bottle-area,
    .object-area,
    .info-area,
    .practice-area,
    .calc-object-area {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .calculation-area {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .calc-zone {
        width: 100%;
        max-width: none;
    }
}

.control-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    font-weight: bold;
    color: #4a5568;
}

.control-group input {
    padding: 6px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9em;
    width: 60px;
    text-align: center;
}

.control-group input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.control-group button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #4299e1;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.control-group button:hover {
    background: #3182ce;
    transform: translateY(-1px);
}

.base-setting {
    text-align: center;
    margin-bottom: 20px;
}

.base-setting label {
    font-size: 1.1em;
    font-weight: bold;
    margin-right: 10px;
}

#base-input {
    padding: 6px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1em;
    width: 60px;
    text-align: center;
    margin-right: 8px;
}

#base-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.base-info {
    color: #718096;
    font-size: 0.9em;
}

/* 按钮组 */
.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.object-controls,
.bottle-controls,
.helper-controls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

/* 按钮样式 */
.btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #a0aec0, #718096);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #38b2ac, #319795);
    color: white;
}

/* 区域操作按钮样式 */
.zone-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2px;
    font-size: 0.8em;
}

.zone-btn:hover {
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* 删除按钮特殊样式 */
.zone-btn.remove-btn,
.remove-btn {
    background: linear-gradient(135deg, #f56565, #e53e3e) !important;
    border: 1px solid rgba(245, 101, 101, 0.3) !important;
    color: white !important;
}

.zone-btn.remove-btn:hover,
.remove-btn:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030) !important;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* 主要内容区域 */
.main-content {
    margin: 0;
    margin-right: 205px; /* 调整为新的控制面板宽度 + 间距 */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.area-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

/* 统计数字样式 */
.stat-count {
    display: inline-block;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 8px;
    box-shadow: 0 2px 6px rgba(66, 153, 225, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-count:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

/* 瓶子展示区 */
.bottle-area {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    min-height: 400px; /* 增加最小高度 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.bottle-container {
    position: relative;
    min-height: 350px; /* 增加最小高度以容纳更多瓶子 */
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    background: rgba(247, 250, 252, 0.5);
    width: 100%; /* 确保容器占满可用宽度 */
}

/* 瓶子样式 */
.bottle {
    position: absolute;
    width: 120px;
    height: 160px;
    cursor: move;
    transition: all 0.3s ease;
    z-index: 1;
}

/* 瓶子被点击时的最高层级 */
.bottle.active {
    z-index: 1000;
}

/* 瓶子被点击时的控制面板也要在最高层级 */
.bottle.active .bottle-floating-panel {
    z-index: 1001;
}

/* 瓶子主体 */
.bottle-body {
    width: 100%;
    height: 100%;
    border: 3px solid #4a90e2;
    border-radius: 12px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

/* 瓶子操作按钮 */
.bottle-action-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border: 2px solid white;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bottle-action-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 悬浮控制面板 */
.bottle-floating-panel {
    position: absolute;
    top: 30px;
    right: -150px;
    width: 140px;
    background: white;
    border: 2px solid #4299e1;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.bottle-floating-panel.panel-show {
    opacity: 1;
    transform: translateX(0);
}

.panel-title {
    font-size: 12px;
    font-weight: bold;
    color: #2d3748;
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.panel-close-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: #f56565;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.panel-close-btn:hover {
    background: #e53e3e;
    transform: scale(1.1);
}

/* 瓶子物体容器 */
.bottle-objects-container {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    height: calc(100% - 40px);
    background: linear-gradient(180deg, 
        rgba(240, 248, 255, 0.1) 0%, 
        rgba(240, 248, 255, 0.2) 100%);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 瓶子内的物体 */
.bottle-object {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* 移除透明的径向渐变背景，让颜色类的背景能够正确显示 */
}

/* 不同颜色的物体 */
.bottle-object.color-0 { 
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    position: relative;
}
.bottle-object.color-1 { 
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    position: relative;
}
.bottle-object.color-2 { 
    background: linear-gradient(135deg, #45b7d1, #3498db);
    position: relative;
}
.bottle-object.color-3 { 
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    position: relative;
}
.bottle-object.color-4 { 
    background: linear-gradient(135deg, #6c5ce7, #5f3dc4);
    position: relative;
}
.bottle-object.color-5 { 
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    position: relative;
}
.bottle-object.color-6 { 
    background: linear-gradient(135deg, #fd79a8, #e84393);
    position: relative;
}
.bottle-object.color-7 { 
    background: linear-gradient(135deg, #00b894, #00a085);
    position: relative;
}
.bottle-object.color-8 { 
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    position: relative;
}
.bottle-object.color-9 { 
    background: linear-gradient(135deg, #e17055, #d63031);
    position: relative;
}

/* 为物体添加高光效果 */
.bottle-object::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* 物体悬停效果 */
.bottle-object:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* 物体动画效果 */
.bottle-object.falling {
    animation: fall 0.5s ease-in;
}

@keyframes fall {
    0% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0.7;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 瓶子批量填充控制面板 */
.bottle-fill-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 6px;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.bottle-fill-input {
    width: 100%;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    text-align: center;
    box-sizing: border-box;
    /* 确保数字输入框的spinner控件可见 */
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
}

/* 显示webkit浏览器的spinner控件 */
.bottle-fill-input::-webkit-outer-spin-button,
.bottle-fill-input::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
    height: 20px;
    cursor: pointer;
}

.bottle-fill-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 4px rgba(33, 150, 243, 0.3);
}

.bottle-fill-btn {
    width: 100%;
    height: 24px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bottle-fill-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
}

.bottle-fill-btn:active {
    transform: translateY(0);
}

.bottle-quick-btns {
    display: flex;
    gap: 2px;
    justify-content: space-between;
}

.bottle-quick-btn {
    flex: 1;
    height: 20px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bottle-quick-btn:hover {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    transform: translateY(-1px);
}

.bottle-quick-btn:active {
    transform: translateY(0);
}

/* 禁用状态样式 */
.bottle-fill-controls.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.bottle-fill-controls.disabled .bottle-fill-input {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.bottle-fill-controls.disabled .bottle-fill-btn,
.bottle-fill-controls.disabled .bottle-quick-btn {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    border-color: #ccc;
}

.bottle-fill-controls.disabled .bottle-fill-btn:hover,
.bottle-fill-controls.disabled .bottle-quick-btn:hover {
    background-color: #e0e0e0;
    transform: none;
    box-shadow: none;
}

/* 瓶子容量进度条样式 */
.bottle-progress-container {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    height: 4px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bottle-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #2ecc71;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* 运算模式下的进度条样式 */
.calc-content .bottle-progress-container {
    bottom: 3px;
    left: 3px;
    right: 3px;
    height: 3px;
}

/* 运算模式下的瓶子样式 */
.calc-content .bottle {
    position: relative;
    width: 80px;
    height: 100px;
    margin: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.calc-content .bottle-body {
    padding: 5px;
}

.calc-content .bottle-action-btn {
    width: 20px;
    height: 20px;
    font-size: 10px;
    top: -6px;
    right: -6px;
}

.calc-content .bottle-floating-panel {
    width: 120px;
    right: -130px;
    padding: 8px;
}

/* 运算模式下的批量填充控制面板 */
.calc-content .bottle-fill-controls {
    padding: 3px;
    gap: 2px;
    margin-bottom: 3px;
}

.calc-content .bottle-fill-input {
    height: 18px;
    font-size: 10px;
    padding: 1px 4px;
    /* 确保运算模式下的spinner控件也可见 */
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
}

/* 运算模式下的spinner控件 */
.calc-content .bottle-fill-input::-webkit-outer-spin-button,
.calc-content .bottle-fill-input::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
    height: 16px;
    cursor: pointer;
}

.calc-content .bottle-fill-btn {
    height: 18px;
    font-size: 9px;
}

.calc-content .bottle-quick-btn {
    height: 16px;
    font-size: 8px;
}

.calc-content .bottle-label {
    font-size: 10px;
    margin-bottom: 2px;
}

.calc-content .bottle-object {
    width: 12px;
    height: 12px;
}

.calc-content .panel-title {
    font-size: 10px;
    margin-bottom: 6px;
}

.calc-content .panel-close-btn {
    width: 16px;
    height: 16px;
    font-size: 12px;
}

.calc-content .bottle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.3);
    z-index: 10;
}

.bottle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.bottle.full {
    border-color: #f6ad55;
    box-shadow: 0 0 20px rgba(246, 173, 85, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(246, 173, 85, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(246, 173, 85, 0.8);
    }
}

/* 运算模式样式 */
.calc-content {
    display: none;
}

.calc-content.active {
    display: block;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
        padding: 15px;
    }
    
    .bottle-container {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 98%;
        padding: 10px;
    }
    
    .bottle {
        width: 100px;
        height: 140px;
    }
    
    .bottle-container {
        min-height: 250px;
    }
    
    .control-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 15px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1800px;
    }
    
    .bottle-container {
        min-height: 450px;
    }
}

/* 练习题区域 */
.practice-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.practice-question {
    font-size: 1.5em;
    font-weight: bold;
    color: #2d3748;
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.practice-answer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.practice-answer input {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.2em;
    width: 150px;
    text-align: center;
}

.practice-answer input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* 计算区域 */
.calculation-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.calc-zone {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    min-width: 200px;
    min-height: 280px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.calc-zone:hover {
    border-color: #4299e1;
    transform: translateY(-2px);
}

.calc-zone h3 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.zone-value {
    color: #4299e1;
    font-weight: bold;
}

.zone-bottles,
.zone-objects {
    min-height: 120px;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: visible;
}

.zone-bottles {
    min-height: 110px;
    background: rgba(66, 153, 225, 0.05);
    border: 2px dashed #4299e1;
    transition: all 0.3s ease;
}

.zone-bottles.drag-over {
    background: rgba(66, 153, 225, 0.15);
    border-color: #2b6cb0;
    transform: scale(1.02);
}

.zone-objects {
    background: rgba(72, 187, 120, 0.05);
    border: 2px dashed #48bb78;
    transition: all 0.3s ease;
}

.zone-objects.drag-over {
    background: rgba(72, 187, 120, 0.15);
    border-color: #2f855a;
    transform: scale(1.02);
}

/* 运算模式区域分组样式 */
.zone-section {
    margin-bottom: 15px;
}

.zone-section-header {
    background: rgba(66, 153, 225, 0.1);
    padding: 8px 12px;
    border-radius: 6px 6px 0 0;
    font-size: 0.9em;
    font-weight: bold;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    border-bottom: none;
    margin-bottom: 0;
}

.zone-section .zone-bottles,
.zone-section .zone-objects {
    margin-top: 0;
    border-radius: 0 0 6px 6px;
}

/* 运算符显示 */
.operator-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
}

.operator {
    font-size: 3em;
    font-weight: bold;
    color: #4299e1;
    background: rgba(255, 255, 255, 0.9);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #4299e1;
}

/* 运算符按钮样式 */
.operator-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.operator-btn {
    padding: 8px 16px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.operator-btn:hover {
    background: #007bff;
    color: white;
}

.operator-btn.active {
    background: #007bff;
    color: white;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

/* 步骤引导系统 */
.guide-system {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    padding: 20px;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 2px solid #4299e1;
    z-index: 1500;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.guide-header h3 {
    color: #2d3748;
    font-size: 1.2em;
}

.guide-progress {
    background: #4299e1;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
}

.guide-text {
    color: #4a5568;
    line-height: 1.6;
    font-size: 1em;
}

.guide-highlight {
    position: absolute;
    border: 2px solid #e74c3c;
    border-radius: 5px;
    background: rgba(231, 76, 60, 0.1);
    pointer-events: none;
    transition: all 0.3s ease;
}

.guide-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.guide-nav-btn {
    padding: 8px 16px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.guide-nav-btn:hover {
    background: #7f8c8d;
}

.guide-nav-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.guide-action-btn {
    padding: 8px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    transition: background 0.3s ease;
}

.guide-action-btn:hover {
    background: #c0392b;
}

.guide-btn {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.guide-btn:hover {
    background: #8e44ad;
}

/* 高亮效果 */
.guide-highlight-active {
    position: relative;
    z-index: 10;
}

.guide-highlight-active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid #e74c3c;
    border-radius: 8px;
    background: rgba(231, 76, 60, 0.1);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* 运算模式特殊样式 */
.calc-object-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .calculation-area {
        flex-direction: column;
        align-items: center;
    }
    
    .operator-display {
        margin: 10px 0;
    }
    
    .operator {
        width: 60px;
        height: 60px;
        font-size: 2em;
    }
    
    .calc-zone {
        min-width: 150px;
        min-height: 200px;
    }
    
    .guide-system {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 20px 0;
        max-width: 100%;
    }
    
    .mode-switch {
        flex-direction: column;
        align-items: center;
    }
}

.bottle-label {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

/* 瓶子编号框 - 显示在瓶子上边线中间 */
.bottle-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    min-width: 20px;
    text-align: center;
}

.bottle-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 3px;
    overflow: hidden;
}

/* 物体散落区 */
.object-area {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    min-height: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.object-container {
    min-height: 150px;
    border: 2px dashed #a0aec0;
    border-radius: 10px;
    background: rgba(247, 250, 252, 0.5);
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
    position: relative;
}

.empty-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #a0aec0;
    font-size: 1.1em;
    text-align: center;
    pointer-events: none;
}

/* 物体样式 */
.object {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: move;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.object:hover {
    transform: scale(1.1);
    z-index: 20;
}

.object.dragging {
    transform: scale(1.2);
    z-index: 1000;
    opacity: 0.8;
}

/* 瓶子内的物体 */
.object.in-bottle {
    width: 20px;
    height: 20px;
    position: relative;
}

/* 物体颜色类 - 使用数字索引与瓶子内物体保持一致 */
.object.color-0 { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.object.color-1 { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.object.color-2 { background: linear-gradient(135deg, #45b7d1, #3498db); }
.object.color-3 { background: linear-gradient(135deg, #f9ca24, #f0932b); }
.object.color-4 { background: linear-gradient(135deg, #6c5ce7, #5f3dc4); }
.object.color-5 { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.object.color-6 { background: linear-gradient(135deg, #fd79a8, #e84393); }
.object.color-7 { background: linear-gradient(135deg, #00b894, #00a085); }

/* 数量信息区 */
.info-area {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calculation-display {
    text-align: center;
}

.concrete-description,
.abstract-formula {
    font-size: 1.2em;
    margin: 10px 0;
    padding: 15px;
    border-radius: 10px;
    background: rgba(247, 250, 252, 0.8);
    border: 1px solid #e2e8f0;
}

.concrete-description {
    color: #2d3748;
    font-weight: bold;
}

.abstract-formula {
    color: #4a5568;
    font-family: 'Courier New', monospace;
}

/* 状态提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #4299e1;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-100px);
    transition: transform 0.3s ease;
    z-index: 1000;
    font-weight: bold;
}

.toast.show {
    transform: translateY(0);
}

.toast.success {
    background: #48bb78;
}

.toast.error {
    background: #f56565;
}

.toast.warning {
    background: #ed8936;
}

/* 帮助弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 1.5em;
}

.close {
    font-size: 2em;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.3s ease;
}

.close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 20px;
    line-height: 1.6;
}

.modal-body h4 {
    color: #2d3748;
    margin: 15px 0 10px;
}

.modal-body ul {
    margin-left: 20px;
}

.modal-body li {
    margin: 8px 0;
}

.modal-body strong {
    color: #4299e1;
}

/* 拖拽相关样式 */
.drag-over {
    background-color: rgba(66, 153, 225, 0.1) !important;
    border-color: #4299e1 !important;
}

.bottle.drag-over {
    transform: scale(1.1);
    border-color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

/* 动画效果 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* 借位弹窗样式 */
.borrow-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.borrow-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

.borrow-content h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 1.5em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.borrow-steps {
    margin-bottom: 25px;
}

.borrow-step {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    animation: stepAppear 0.5s ease-out;
}

.step-number {
    background: #e74c3c;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 0.9em;
}

.step-text {
    flex: 1;
    color: #2c3e50;
    font-size: 1.1em;
    line-height: 1.4;
}

.close-borrow-btn {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.close-borrow-btn:hover {
    background: #2980b9;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes stepAppear {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 练习题样式 */
.practice-controls {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.practice-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
}

.generate-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.generate-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.check-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.check-btn:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.reset-btn {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #F57C00, #E65100);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.practice-stats {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stats-item:last-child {
    margin-bottom: 0;
}

.stats-label {
    font-weight: 500;
    color: #495057;
}

.stats-value {
    font-weight: bold;
    color: #007bff;
    font-size: 16px;
}

.question-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.question-hint {
    font-size: 14px;
    color: #666;
    text-align: center;
    font-style: italic;
    margin-top: 10px;
}

.no-question {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* 答案解释弹窗 */
.answer-explanation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.explanation-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.explanation-content h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    text-align: center;
}

.explanation-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    line-height: 1.6;
    white-space: pre-line;
    border-left: 4px solid #007bff;
}

.user-answer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    color: #856404;
    text-align: center;
    font-weight: bold;
}

.close-explanation-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.close-explanation-btn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .object-controls,
    .bottle-controls,
    .helper-controls {
        justify-content: center;
    }
    
    .bottle {
        width: 100px;
        height: 140px;
    }
    
    .main-content {
        margin: 0 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .borrow-content {
        padding: 20px;
        margin: 20px;
    }
    
    .borrow-content h3 {
        font-size: 1.3em;
    }
    
    .step-text {
        font-size: 1em;
    }
    
    .practice-controls {
        flex-direction: column;
    }
    
    .practice-btn {
        width: 100%;
    }
    
    .explanation-content {
        padding: 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 15px;
        font-size: 0.9em;
        min-width: 80px;
    }
    
    .bottle {
        width: 80px;
        height: 120px;
    }
    
    .object {
        width: 25px;
        height: 25px;
    }
    
    .object.in-bottle {
        width: 15px;
        height: 15px;
    }
}

/* 60进制时间按钮特殊样式 - 辅助按钮 */
.time-base-btn {
    background: linear-gradient(135deg, #fbb6ce, #f687b3) !important;
    color: #744c4c !important;
    border: 1px solid #f687b3 !important;
    font-weight: normal;
    font-size: 0.8em !important;
    padding: 4px 8px !important;
    position: relative;
    overflow: hidden;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.time-base-btn:hover {
    background: linear-gradient(135deg, #f687b3, #ed64a6) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(246, 135, 179, 0.3);
    opacity: 1;
}

.time-base-btn:before {
    content: '⏰';
    margin-right: 3px;
    font-size: 0.9em;
}

/* 常用进制按钮样式 - 辅助按钮 */
.common-base-btn {
    background: linear-gradient(135deg, #bee3f8, #90cdf4) !important;
    color: #2c5aa0 !important;
    border: 1px solid #90cdf4 !important;
    font-weight: normal;
    font-size: 0.8em !important;
    padding: 4px 8px !important;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.common-base-btn:hover {
    background: linear-gradient(135deg, #90cdf4, #63b3ed) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(144, 205, 244, 0.3);
    opacity: 1;
}

/* 更新进制按钮 - 主要按钮 */
.control-group button[onclick="updateBase()"] {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
    color: white !important;
    border: 2px solid #48bb78 !important;
    font-weight: bold !important;
    font-size: 1.1em !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3) !important;
    position: relative;
    margin-left: 10px !important;
    transition: all 0.3s ease;
}

.control-group button[onclick="updateBase()"]:hover {
    background: linear-gradient(135deg, #38a169, #2f855a) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4) !important;
}

.control-group button[onclick="updateBase()"]:before {
    content: '✓ ';
    margin-right: 5px;
    font-weight: bold;
}

/* 进制设置区域的布局调整 */
.control-group:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 5px;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 5px;
    border: 2px solid #e2e8f0;
    margin-bottom: 5px;
    position: relative;
    overflow: hidden;
}

.control-group:first-child:after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75em;
    color: #718096;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

/* 60进制时间说明区域样式 */
.time-explanation {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border: 2px solid #ff6b6b;
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
    animation: fadeIn 0.5s ease;
}

/* 区域控制 */
.zone-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

/* 批量控制 */
.batch-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 5px;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.batch-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-buttons {
    display: flex;
    gap: 5px;
}

.quick-btn {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 35px;
}

.quick-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.quick-btn:active {
    background: #dee2e6;
    transform: translateY(1px);
}

.batch-controls label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-right: 5px;
}

.batch-controls input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.batch-controls input[type="number"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.batch-controls button {
    padding: 6px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    margin-bottom: 5px;
}

.batch-controls .batch-add-objects {
    background: #28a745;
    color: white;
}

.batch-controls .batch-add-objects:hover {
    background: #218838;
    transform: translateY(-1px);
}

.batch-controls .batch-add-bottles {
    background: #17a2b8;
    color: white;
}

.batch-controls .batch-add-bottles:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* 满瓶选项样式 */
.bottle-options {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    user-select: none;
}

input.full-bottle-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    width: 20px;
}

.checkmark {
    position: relative;
    margin-left: 4px;
}

.checkbox-label:hover {
    color: #007bff;
}

.full-bottle-checkbox:checked + .checkmark::before {
    content: '';
    position: absolute;
    left: -20px;
    top: -2px;
    color: #007bff;
    font-weight: bold;
    font-size: 14px;
}

.time-info h4 {
    color: #c53030;
    font-size: 1.3em;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 10px;
}

.time-info p {
    color: #2d3748;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-align: center;
}

.time-examples {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.example-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.example-item:last-child {
    margin-bottom: 0;
}

.example-label {
    font-weight: bold;
    color: #c53030;
    min-width: 80px;
    margin-right: 10px;
}

.example-content {
    color: #2d3748;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.time-tips {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #ff6b6b;
}

.time-tips p {
    margin-bottom: 10px;
    color: #c53030;
    font-weight: bold;
}

.time-tips ul {
    margin: 0;
    padding-left: 20px;
}

.time-tips li {
    color: #4a5568;
    margin-bottom: 8px;
    line-height: 1.5;
}

.time-tips li:last-child {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}