:root {
    --primary-color: #007acc;
    --bg-dark: #1e1e1e;
    --bg-light: #f5f5f5;
    --text-dark: #ffffff;
    --text-light: #333333;
    --border-dark: #333333;
    --border-light: #cccccc;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    padding-top: 100px;
    /* 添加顶部内边距，为固定工具栏留出空间 */
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* 全局工具栏样式 */
.toolbar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: #2a2a2a;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #444;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toolbar-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toolbar-btn:hover {
    background: #005a9e;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 204, 0.3);
}

.toolbar-btn:active {
    transform: translateY(0);
}

.toolbar-btn.saving {
    background: #666;
    cursor: not-allowed;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.save-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.save-indicator.show {
    opacity: 1;
}

.save-indicator.warning {
    background: #ff9800;
}

.save-indicator.error {
    background: #f44336;
}

.shortcut-hint {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 5px;
}

.container {
    display: flex;
    gap: 20px;
    margin: 0 auto;
    /* 为固定左侧栏留出空间 */
}

.left-panel {
    position: fixed;
    left: 20px;
    top: 20px;
    width: 250px;
    height: calc(100vh - 40px);
    flex-shrink: 0;
    overflow-y: auto;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
    scrollbar-gutter: stable;
}

.right-panel {
    flex: 1;
    min-width: 0;
    /* 允许右侧内容收缩 */
}

.add-queue-section {
    text-align: center;
    margin-top: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.panel-title {
    font-weight: bold;
    font-size: 1.1em;
}

.collapse-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.collapse-btn:hover {
    background: rgba(0, 122, 204, 0.2);
}

.units-container {
    margin-bottom: 20px;
}

.unit-item {
    padding: 12px;
    margin: 5px 0;
    background: #444;
    border: 1px solid #666;
    border-radius: 6px;
    cursor: grab;
    text-align: center;
    user-select: none;
    position: relative;
    /* 添加相对定位以支持删除按钮的绝对定位 */
}

.unit-item .unit-name {
    display: block;
    font-weight: bold;
    color: #aaa;
    font-size: 12px;
}

.unit-item .unit-display {
    display: block;
    color: white;
    font-weight: bold;
}

/* 确保自定义单位样式一致 */
.unit-item.custom-unit {
    position: relative;
    padding-right: 30px;
}

.unit-item:active {
    cursor: grabbing;
}

.unit-item.dragging-source {
    opacity: 0.5;
    transform: scale(0.95);
}

.queue-container {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.queue-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-title {
    font-weight: bold;
    font-size: 1.1em;
}

.queue-actions {
    display: flex;
    gap: 10px;
}

.collapse-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.collapse-btn:hover {
    background: rgba(0, 122, 204, 0.2);
}

.queue-content {
    transition: all 0.3s ease;
}

.unit-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

/* 可编辑单元格样式 */
.editable-cell {
    cursor: pointer;
    position: relative;
}

.editable-cell:hover {
    background-color: #3a3a3a;
}

.editing {
    background-color: #3a3a3a !important;
}

.editable-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23525F67' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 5.63l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 16px 16px;
}

.readonly-field {
    cursor: default;
    opacity: 0.8;
}

.readonly-field:hover {
    background-color: transparent !important;
}

.unit-table th,
.unit-table td {
    border: 1px solid #444;
    padding: 10px;
    text-align: center;
    position: relative;
}

.unit-table th {
    background: #333;
    font-weight: bold;
}

.unit-row {
    cursor: grab;
    user-select: none;
}

.unit-row:active {
    cursor: grabbing;
}

.unit-row.dragging {
    opacity: 0.7;
    transform: scale(1.02);
}

.unit-row.drag-over-above {
    border-top: 3px solid var(--primary-color);
}

.unit-row.drag-over-below {
    border-bottom: 3px solid var(--primary-color);
}

.btn {
    padding: 8px 15px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    background: #007acc;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #005a9e;
}

.btn.delete {
    background: #dc3545;
}

.btn.delete:hover {
    background: #c82333;
}

.btn.copy {
    background: #28a745;
}

.btn.copy:hover {
    background: #218838;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-dark);
    border-radius: 10px;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px 15px 30px;
    border-bottom: 1px solid #444;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #333;
    color: #fff;
}

.modal-body {
    padding: 20px 30px;
}

/* 只读信息样式 */
.readonly-info {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: bold;
    color: #aaa;
}

.info-value {
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.5);
}

/* 编辑弹窗专用的水平表单布局 */
.form-group-horizontal {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.form-group-horizontal label {
    display: block;
    font-weight: bold;
    white-space: nowrap;
    min-width: 80px;
}

.form-group-horizontal input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: var(--text-dark);
    font-size: 14px;
    min-width: 0;
}

.form-group-horizontal input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.5);
}

.unit-sortable.drag-over-list {
    background: rgba(0, 122, 204, 0.1);
    border: 2px dashed var(--primary-color);
}

.queue-content.drag-over-content {
    background: rgba(0, 122, 204, 0.05);
}

.unit-row.dragging {
    opacity: 0.7;
    transform: rotate(5deg);
}

.unit-row.drag-over-above {
    border-top: 3px solid var(--primary-color);
}

.unit-row.drag-over-below {
    border-bottom: 3px solid var(--primary-color);
}

.drop-hint {
    text-align: center;
    padding: 30px;
    color: #888;
    font-style: italic;
    border: 2px dashed #444;
    border-radius: 8px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
}

.drop-hint p {
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #333;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.5);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.modal-buttons .btn {
    min-width: 100px;
}

/* 自定义单位区域样式 */
.custom-units-section {
    margin-top: 20px;
}

.section-divider {
    height: 1px;
    background: #444;
    margin: 15px 0;
}

#builtin-units {
    transition: all 0.3s ease;
}

#builtin-units.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#custom-units {
    max-height: 300px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

#custom-units.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.no-custom-units {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

.custom-unit-item {
    position: relative;
    padding-right: 30px;
}

.custom-unit-item .unit-name {
    display: block;
    font-weight: bold;
}

.custom-unit-item .unit-display {
    display: block;
    font-size: 12px;
    color: #aaa;
}

.delete-custom-unit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-custom-unit:hover {
    background: #c82333;
}

/* 自定义单位添加表单样式 */
.add-custom-unit-form {
    padding: 15px;
    background: #2a2a2a;
    border-radius: 8px;
    margin-top: 15px;
    /* 改为顶部边距，因为现在在列表下方 */
    display: none;
    /* 默认隐藏，通过折叠功能控制显示 */
}

.add-custom-unit-form.expanded {
    display: block;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #ccc;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #333;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007acc;
}

.add-custom-btn {
    width: 100%;
    padding: 10px;
    background: #007acc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.add-custom-btn:hover {
    background: #005a9e;
}

/* 批量添加自定义单位按钮 */
.batch-add-btn {
    width: 100%;
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background 0.2s;
}

.batch-add-btn:hover {
    background: #218838;
}

/* 批量添加自定义单位模态框 */
.batch-add-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.batch-add-modal-content {
    background: #2c2c2c;
    width: 600px;
    max-width: 90%;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.batch-add-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.batch-add-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
}

.batch-add-modal-close-btn {
    background: #ff4444;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.batch-add-modal-close-btn:hover {
    background: #ff0000;
}

.batch-add-modal-body {
    flex: 1;
}

.batch-add-textarea {
    width: 100%;
    height: 250px;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #333;
    color: white;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.batch-add-textarea:focus {
    outline: none;
    border-color: #007acc;
}

.batch-add-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.batch-add-confirm-btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.batch-add-confirm-btn:hover {
    background: #005a9e;
}

.batch-add-cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.batch-add-cancel-btn:hover {
    background: #5a6268;
}

/* 消息提示样式增强 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;
}

.message-toast.error {
    background: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 美化滚动条样式 - 专业版 */
/* Webkit浏览器滚动条 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(42, 42, 42, 0.2) 20%,
            rgba(42, 42, 42, 0.4) 50%,
            rgba(42, 42, 42, 0.2) 80%,
            transparent 100%);
    border-radius: 8px;
    box-shadow:
        inset 0 0 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg,
            #4a4a4a 0%,
            #5a5a5a 30%,
            #6a6a6a 70%,
            #5a5a5a 100%);
    border-radius: 8px;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

::-webkit-scrollbar-thumb::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg,
            #6a6a6a 0%,
            #7a7a7a 30%,
            #8a8a8a 70%,
            #7a7a7a 100%);
    transform: scaleX(1.05);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.15),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg,
            #8a8a8a 0%,
            #9a9a9a 30%,
            #aaaaaa 70%,
            #9a9a9a 100%);
    transform: scaleX(1.08) scaleY(0.95);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* Firefox滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #5a5a5a #2a2a2a;
}

/* 特定区域滚动条优化 */
.left-panel {
    overflow-y: auto;
    /* 确保滚动条正常工作 */
}

.right-panel {
    overflow-y: auto;
}

/* 内置单位区域不需要单独的滚动设置 */
#builtin-units {
    /* 移除所有overflow设置，让父容器处理滚动 */
    margin-top: 15px;
}

#custom-units {
    overflow-y: auto;
    max-height: 300px;
    margin-top: 15px;
}

.unit-table {
    overflow-x: auto;
}

/* 滚动条悬停效果增强 */
.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover,
#custom-units::-webkit-scrollbar-thumb:hover,
.unit-table::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg,
            #7a7a7a 0%,
            #8a8a8a 30%,
            #9a9a9a 70%,
            #8a8a8a 100%);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滚动条激活效果增强 */
.left-panel::-webkit-scrollbar-thumb:active,
.right-panel::-webkit-scrollbar-thumb:active,
#custom-units::-webkit-scrollbar-thumb:active,
.unit-table::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg,
            #9a9a9a 0%,
            #aaaaaa 30%,
            #bababa 70%,
            #aaaaaa 100%);
}

/* 添加滚动条出现动画 */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar,
#custom-units::-webkit-scrollbar,
.unit-table::-webkit-scrollbar {
    transition: all 0.3s ease;
}

/* 滚动时的特殊效果 */
.left-panel:hover::-webkit-scrollbar-track,
.right-panel:hover::-webkit-scrollbar-track,
#custom-units:hover::-webkit-scrollbar-track,
.unit-table:hover::-webkit-scrollbar-track {
    background: linear-gradient(90deg,
            rgba(42, 42, 42, 0.1) 0%,
            rgba(42, 42, 42, 0.3) 20%,
            rgba(42, 42, 42, 0.5) 50%,
            rgba(42, 42, 42, 0.3) 80%,
            rgba(42, 42, 42, 0.1) 100%);
    box-shadow:
        inset 0 0 6px rgba(0, 0, 0, 0.15),
        inset 0 3px 6px rgba(255, 255, 255, 0.08);
}

.left-panel:hover::-webkit-scrollbar-thumb,
.right-panel:hover::-webkit-scrollbar-thumb,
#custom-units:hover::-webkit-scrollbar-thumb,
.unit-table:hover::-webkit-scrollbar-thumb {
    box-shadow:
        0 0 15px rgba(90, 90, 90, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        inset 0 -1px 3px rgba(0, 0, 0, 0.25);
}

/* 内联编辑输入框样式 */
.edit-input {
    width: 100%;
    height: 100%;
    padding: 10px 0;
    /* 补偿单元格的padding */
    border: 1px solid #555;
    border-radius: 4px;
    background: #333;
    color: white;
    font-size: inherit;
    font-family: inherit;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    text-align: center;
    line-height: normal;
    vertical-align: middle;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.edit-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.queue-edit-input {
    padding: 2px 4px;
    border: 1px solid #4CAF50;
    border-radius: 4px;
    font-size: inherit;
    background: #2c2c2c;
    color: white;
    outline: none;
    box-sizing: border-box;
}

.queue-edit-input:focus {
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

/* 动作脚本选择框样式 */
.queue-edit-select {
    padding: 2px 4px;
    border: 1px solid #4CAF50;
    border-radius: 4px;
    font-size: inherit;
    background: #2c2c2c;
    color: white;
    outline: none;
    box-sizing: border-box;
    min-width: 120px;
}

.queue-edit-select:focus {
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

.queue-edit-select option {
    background: #333;
    color: white;
    padding: 4px;
}

/* 队列信息显示 */
.queue-info {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.queue-info span {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(76, 175, 80, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.queue-info span:hover {
    background: rgba(76, 175, 80, 0.2);
}

/* 确保复制队列中的信息元素也能正确显示 */
.queue-container .queue-info span {
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 270px;
    /* 与container的padding-left一致 */
}

.header-container {
    text-align: center;
    margin-bottom: 30px;
}

.header-container h1 {
    margin: 0;
    text-align: center;
    font-size: 28px;
}

/* 批量设置出生时间模态框样式 */
.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(3px);
}

.modal-content {
    background-color: var(--bg-dark);
    margin: 10% auto;
    padding: 0;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-dark);
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover,
.close:focus {
    color: var(--text-dark);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-dark);
}

.form-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    background-color: #2a2a2a;
    color: var(--text-dark);
    font-size: 16px;
    box-sizing: border-box;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #252525;
    border-radius: 0 0 8px 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #005a9e;
}

.btn-secondary {
    background-color: #666;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #555;
}

.batch-set-spawn {
    background-color: #28a745;
}

.batch-set-spawn:hover {
    background-color: #218838;
}

.batch-set-count {
    background-color: #17a2b8;
}

.batch-set-count:hover {
    background-color: #138496;
}

.batch-set-level {
    background-color: #6f42c1;
}

.batch-set-level:hover {
    background-color: #5a32a3;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-btn:hover {
    background-color: #5a6268;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #2a2a2a;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-radius: 4px;
    z-index: 1000;
    top: 100%;
    left: 0;
    margin-top: 5px;
    border: 1px solid #444;
}

.dropdown-item {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #3a3a3a;
}