@charset "UTF-8";

:root {
    --bg0: #070a12;
    --bg1: #0b1222;
    --bg2: #0b1a30;
    --panel: rgba(12, 22, 40, 0.72);
    --panel-strong: rgba(12, 22, 40, 0.86);
    --stroke: rgba(148, 190, 255, 0.18);
    --stroke-strong: rgba(148, 190, 255, 0.28);
    --text: rgba(235, 242, 255, 0.92);
    --muted: rgba(168, 197, 230, 0.82);
    --muted-2: rgba(168, 197, 230, 0.62);
    --accent: #4ECDC4;
    --accent-2: #4a9fff;
    --warn: #FFE66D;
    --danger: #ff4757;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

body {
    background: radial-gradient(1200px 900px at 20% -10%, rgba(78, 205, 196, 0.22), rgba(78, 205, 196, 0) 60%),
        radial-gradient(1200px 900px at 90% 0%, rgba(74, 159, 255, 0.22), rgba(74, 159, 255, 0) 55%),
        linear-gradient(135deg, var(--bg0), var(--bg1), var(--bg2));
    color: var(--text);
    color-scheme: dark;
    min-height: 100vh;
    padding: 18px;
    line-height: 1.6;
    position: relative;
    font-size: 12px;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(800px 600px at 25% 25%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 65%),
        radial-gradient(800px 600px at 75% 55%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 60%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.55));
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 12px 0 18px;
    margin-bottom: 18px;
    position: relative;
}

.logo {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--panel), transparent 15%);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
    .logo {
        grid-template-columns: auto 1fr;
        row-gap: 10px;
    }

    .logo #importBtn,
    .logo #exportBtn {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .logo .help-icon {
        grid-column: 2;
        justify-self: end;
    }
}

.logo #importBtn {
    position: static;
}

.logo #exportBtn {
    position: static;
}

.logo .help-icon {
    position: static;
}

/* 移除导入导出按钮的hover动画 */
#importBtn:hover,
#exportBtn:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(74, 159, 255, 0.3);
}

.logo-icon {
    font-size: 3rem;
    color: var(--accent);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

h1 {
    font-size: 1.3rem;
    background: linear-gradient(90deg, #4ECDC4, #FFE66D, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    flex: 1;
    margin: 0;
    text-align: left;
    letter-spacing: 0.2px;
}

.subtitle {
    font-size: 1rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--muted);
}

.main-content {
    display: grid;
    grid-template-columns: 280px 1fr 250px;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.config-panel {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid var(--stroke);
    height: 900px;
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid color-mix(in srgb, var(--accent-2), transparent 25%);
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i {
    font-size: 1.4rem;
}

.level-list {
    list-style: none;
    margin-bottom: 25px;
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.level-list::-webkit-scrollbar {
    width: 8px;
}

.level-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.level-list::-webkit-scrollbar-thumb {
    background: rgba(74, 159, 255, 0.6);
    border-radius: 4px;
}

.level-item {
    background: rgba(74, 159, 255, 0.10);
    border: 1px solid rgba(148, 190, 255, 0.18);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.level-item:hover {
    background: rgba(74, 159, 255, 0.18);
    border-color: rgba(148, 190, 255, 0.28);
}

.level-item.empty-state {
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 20px;
    cursor: default;
}

.level-item.empty-state:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.level-item.empty-state .level-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 8px;
}

.level-item.empty-state .level-config {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-style: italic;
}

.level-item.active {
    background: rgba(74, 159, 255, 0.22);
    border-color: rgba(148, 190, 255, 0.40);
    box-shadow: 0 0 0 1px rgba(74, 159, 255, 0.18), 0 14px 28px rgba(0, 0, 0, 0.35);
}

.level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    position: relative;
}

.level-title {
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.level-config {
    font-family: monospace;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.18);
    padding: 8px;
    border-radius: 8px;
    margin-top: 8px;
    color: var(--warn);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.level-layout {
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 3px;
    font-style: italic;
}

/* 新的内联操作按钮样式 */
.level-actions-inline {
    display: flex;
    gap: 4px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.level-item:hover .level-actions-inline {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* 编辑按钮从左侧滑入 */
.level-actions-inline .edit-btn {
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s ease 0.1s;
}

/* 删除按钮从右侧滑入 */
.level-actions-inline .delete-btn {
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.3s ease 0.2s;
}

.level-item:hover .level-actions-inline .edit-btn,
.level-item:hover .level-actions-inline .delete-btn {
    transform: translateX(0);
    opacity: 1;
}

.action-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(74, 159, 255, 0.6), rgba(0, 212, 255, 0.6));
    border: 1px solid rgba(74, 159, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(74, 159, 255, 0.2);
    font-size: 0.8rem;
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(74, 159, 255, 0.8), rgba(0, 212, 255, 0.8));
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 159, 255, 0.4);
    border-color: rgba(74, 159, 255, 0.5);
}

.edit-btn {
    background: linear-gradient(135deg, rgba(0, 180, 155, 0.6), rgba(78, 205, 196, 0.6));
    border-color: rgba(0, 180, 155, 0.3);
}

.edit-btn:hover {
    background: linear-gradient(135deg, rgba(0, 180, 155, 0.8), rgba(78, 205, 196, 0.8));
    border-color: rgba(0, 180, 155, 0.5);
    box-shadow: 0 4px 12px rgba(0, 180, 155, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.6), rgba(255, 75, 43, 0.6));
    border-color: rgba(255, 65, 108, 0.3);
}

.delete-btn:hover {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.8), rgba(255, 75, 43, 0.8));
    border-color: rgba(255, 65, 108, 0.5);
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.4);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.btn {
    background: linear-gradient(135deg, rgba(74, 159, 255, 0.88), rgba(0, 212, 255, 0.78));
    color: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 190, 255, 0.28);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    background: linear-gradient(135deg, rgba(74, 159, 255, 0.96), rgba(0, 212, 255, 0.84));
    border-color: rgba(148, 190, 255, 0.42);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.22), 0 0 0 1px rgba(78, 205, 196, 0.35), 0 14px 30px rgba(0, 0, 0, 0.35);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.btn-secondary {
    background: linear-gradient(135deg, rgba(58, 123, 213, 0.85), rgba(0, 210, 255, 0.75));
    border-color: rgba(148, 190, 255, 0.26);
}

.btn.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(58, 123, 213, 0.9), rgba(0, 210, 255, 0.9));
    border-color: rgba(58, 123, 213, 0.6);
    box-shadow: 0 6px 20px rgba(58, 123, 213, 0.5);
}

.btn.btn-danger {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.88), rgba(255, 75, 43, 0.78));
    border-color: rgba(255, 65, 108, 0.35);
}

.btn.btn-danger:hover {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.9), rgba(255, 75, 43, 0.9));
    border-color: rgba(255, 65, 108, 0.6);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.5);
}

.game-container {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid var(--stroke);
    display: flex;
    flex-direction: column;
    height: 900px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 15px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-lg);
    padding: 14px;
    border: 1px solid rgba(148, 190, 255, 0.14);
    flex-wrap: wrap;
    gap: 15px;
}

.game-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.game-title {
    font-size: 1.4rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4ECDC4;
}

.stats {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
}

.stat-box {
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(148, 190, 255, 0.14);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.stat-box i {
    color: rgba(78, 205, 196, 0.9);
}

.layout-box {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    order: 2;
    flex-wrap: nowrap;
}

.occlusion-box {
    order: 2;
    gap: 8px;
}

.occlusion-box input {
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 190, 255, 0.22);
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 0.8rem;
    width: 72px;
    min-width: 72px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.occlusion-box input:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.55);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.18);
}

.stat-box:not(.layout-box):not(.occlusion-box) {
    order: 1;
}

.layout-box select {
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 190, 255, 0.22);
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 0.8rem;
    min-width: 120px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.layout-box select:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.55);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.18);
}

.layout-box input {
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 190, 255, 0.22);
    border-radius: 8px;
    padding: 7px 8px;
    font-size: 0.8rem;
    min-width: 150px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.layout-box input:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.55);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.18);
}

.layout-box button {
    background: linear-gradient(135deg, rgba(74, 159, 255, 0.88), rgba(0, 212, 255, 0.78));
    color: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 190, 255, 0.28);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.layout-box button:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

.bottles-grid {
    position: relative;
    width: 700px;
    height: 900px;
    margin: 0 auto;
    border: 1px dashed rgba(148, 190, 255, 0.28);
    background: rgba(0, 0, 0, 0.10);
    flex-shrink: 0; /* 防止被flex容器压缩 */
    transform: scale(0.8);
    transform-origin: center top;
    /* 保持700:900比例但缩放以适应容器 */
}

@media (max-width: 1200px) {
    .bottles-grid {
        transform: scale(0.72);
    }
}

@media (max-width: 980px) {
    .bottles-grid {
        transform: scale(0.64);
    }
}

@media (max-width: 900px) {
    .bottles-grid {
        transform: scale(0.78);
    }
}

/* 默认网格布局 */
.bottles-grid:not(.custom-layout) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 15px;
    padding: 20px;
}

/* 默认布局下瓶子不使用绝对定位 */
.bottles-grid:not(.custom-layout) .bottle {
    position: relative;
    transform: none;
}

.bottles-grid::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    color: #4ECDC4;
    font-size: 0.9rem;
    font-weight: bold;
}

/* 瓶子以中心为锚点定位 */
.bottles-grid .bottle {
    position: absolute;
    transform: translate(-50%, -50%);
}

.bottle {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    width: 78px;
    height: 198px;
    filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.35));
}



.bottle.selected {
    filter: drop-shadow(0 0 12px rgba(74, 159, 255, 0.85));
}

.bottles-grid .bottle.selected {
    transform: translate(-50%, -50%) translateY(-10px);
}

.bottles-grid:not(.custom-layout) .bottle.selected {
    transform: translateY(-10px);
}

.bottle::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12) 30%, rgba(255, 255, 255, 0.35) 70%, rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 10px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 3;
}

.bottle::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -12px;
    transform: translateX(-50%);
    width: 76px;
    height: 18px;
    border-radius: 999px;
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%);
    opacity: 0.75;
    pointer-events: none;
    z-index: 1;
}

/* 默认布局下瓶子装饰元素的大小调整 */
.bottles-grid:not(.custom-layout) .bottle::before {
    top: 20px;
    width: 22px;
    height: 7px;
}

.bottles-grid:not(.custom-layout) .bottle::after {
    bottom: -8px;
    width: 38px;
    height: 12px;
}

.bottle-type {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.bottle-type.normal {
    color: #4a9fff;
}

.bottle-type.ad {
    color: #FFE66D;
}

.bottle-type.colored {
    color: #FF6B6B;
}

.bottle-unlock-info {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    white-space: nowrap;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 3px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 瓶子解锁条件显示 - 优化为偏长方形，无动画，靠近颜色瓶数量 */
.bottle-unlock-simple {
    position: absolute;
    top: 45px;           /* 向下移动 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    pointer-events: none;
    border-radius: 6px;   /* 更小的圆角 */
    min-width: 60px;      /* 稍宽一些 */
    height: 32px;        /* 更低的高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;   /* 更细的边框 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(1px);
    padding: 0 8px;
}

.unlock-text {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    letter-spacing: 0;
}



/* 瓶子编辑模态框样式 */
.bottle-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.bottle-edit-content {
    background: var(--panel-strong);
    border-radius: var(--radius-md);
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border: 1px solid var(--stroke-strong);
    box-shadow: var(--shadow-lg);
}

.bottle-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(74, 159, 255, 0.2);
}

.bottle-edit-header h3 {
    color: var(--accent);
    font-size: 1.2rem;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 71, 87, 0.1);
    transform: scale(1.1);
}

.unlock-section {
    margin-bottom: 25px;
}

.unlock-section label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
}

.unlock-section input[type="number"] {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(148, 190, 255, 0.22);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.unlock-section input[type="number"]:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.55);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.18);
}

.color-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.color-option:hover {
    background: rgba(74, 159, 255, 0.2);
    border-color: rgba(74, 159, 255, 0.3);
}

.color-option.selected {
    background: rgba(74, 159, 255, 0.3);
    border-color: #4ECDC4;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.color-preview-small {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.color-option span {
    font-size: 0.8rem;
    color: #e6e6e6;
}

.color-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.color-actions .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.bottle-edit-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(74, 159, 255, 0.2);
}

.unlock-icon {
    font-size: 0.7rem;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.8));
}

.unlock-text {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.bottle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 159, 255, 0.3);
    border-radius: 18px;
    z-index: 5;
    pointer-events: none;
    border: 2px solid rgba(74, 159, 255, 0.6);
}

.bottle-neck {
    width: 38px;
    height: 22px;
    position: relative;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06) 35%, rgba(255, 255, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 18px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.bottle-neck::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 3px;
    width: 8px;
    height: calc(100% - 6px);
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    opacity: 0.55;
    pointer-events: none;
}

.bottle-body {
    width: 66px;
    height: 168px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.05) 32%, rgba(255, 255, 255, 0.1) 70%, rgba(0, 0, 0, 0.12));
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    flex-direction: column-reverse;
    padding: 7px 7px 9px;
    gap: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 18px 28px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

.bottle-body::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 10px;
    border-radius: 999px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0));
    opacity: 0.65;
    pointer-events: none;
    z-index: 3;
}

.bottle-body::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    opacity: 0.9;
    pointer-events: none;
    z-index: 3;
}

/* 默认布局下瓶子组件的大小调整 */
.bottles-grid:not(.custom-layout) .bottle-neck {
    width: 25px;
    height: 15px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 12px rgba(0, 0, 0, 0.22);
}

.bottles-grid:not(.custom-layout) .bottle-neck::after {
    left: 3px;
    top: 2px;
    width: 5px;
    height: calc(100% - 4px);
}

.bottles-grid:not(.custom-layout) .bottle-body {
    width: 37px;
    height: 90px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    padding: 3px;
    gap: 2px;
}

.bottle.bottle-normal .bottle-body {
    border-color: rgba(74, 159, 255, 0.25);
}

.bottle.bottle-colored .bottle-body {
    border-color: rgba(255, 107, 107, 0.25);
}

.bottle.ad-bottle .bottle-body {
    border-color: rgba(255, 215, 0, 0.55);
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.14), 0 18px 28px rgba(0, 0, 0, 0.35);
}

.bottle-layer {
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.bottle-layer.empty {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03) 45%, rgba(0, 0, 0, 0.05));
}

.bottle-layer.filled {
    background: var(--liquid-color);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--liquid-color), white 22%) 0%,
        color-mix(in srgb, var(--liquid-color), white 6%) 35%,
        color-mix(in srgb, var(--liquid-color), black 16%) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 12px 16px rgba(255, 255, 255, 0.18), inset 0 -14px 16px rgba(0, 0, 0, 0.26);
}

.bottle-layer.filled::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.18));
    opacity: 0.9;
    pointer-events: none;
}

.bottle-layer.filled::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 30%, rgba(255, 255, 255, 0.20) 0 2px, rgba(255, 255, 255, 0) 3px),
        radial-gradient(circle at 62% 55%, rgba(255, 255, 255, 0.14) 0 2px, rgba(255, 255, 255, 0) 3px),
        radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.12) 0 1px, rgba(255, 255, 255, 0) 3px);
    opacity: 0.55;
    pointer-events: none;
}

.bottle-layer.top-liquid::after {
    content: '';
    position: absolute;
    left: -12%;
    right: -12%;
    top: -7px;
    height: 16px;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
        radial-gradient(circle at 10px 11px, rgba(255, 255, 255, 0.26) 0 7px, rgba(255, 255, 255, 0) 8px);
    background-size: auto, 16px 14px;
    background-repeat: no-repeat, repeat-x;
    background-position: center, 0 100%;
    opacity: 1;
    pointer-events: none;
}

/* 默认布局下瓶子层的大小调整 */
.bottles-grid:not(.custom-layout) .bottle-layer {
    height: 19px;
    border-radius: 4px;
}

.bottles-grid:not(.custom-layout) .bottle-layer.filled::after {
    top: -4px;
    height: 10px;
}

.config-section {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-md);
    margin-top: 30px;
    border: 1px solid var(--stroke);
    backdrop-filter: blur(10px);
}

.color-config-panel {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid var(--stroke);
    height: 900px;
    display: flex;
    flex-direction: column;
}





.section-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #4ECDC4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    min-height: 40px; /* 确保所有section-header高度一致 */
}

.section-header .section-title {
    margin: 0;
}

.color-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.color-btn {
    height: 1.2rem;
    padding: 4px 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(74, 159, 255, 0.8), rgba(0, 212, 255, 0.8));
    color: white;
    border-color: rgba(74, 159, 255, 0.4);
}

.color-btn:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}

.color-btn.selected {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 4px 15px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

.add-color {
    background: linear-gradient(135deg, rgba(0, 176, 155, 0.8), rgba(150, 201, 61, 0.8));
    border-color: rgba(0, 176, 155, 0.4);
    color: white;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    width: auto;
    height: 2rem;
    font-size: 0.8rem;
    line-height: 1rem;
}

.add-color:hover {
    background: linear-gradient(135deg, rgba(0, 176, 155, 0.9), rgba(150, 201, 61, 0.9));
    border-color: rgba(0, 176, 155, 0.6);
    box-shadow: 0 4px 15px rgba(0, 176, 155, 0.4);
}

.remove-color {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.8), rgba(255, 75, 43, 0.8));
    border-color: rgba(255, 65, 108, 0.4);
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    width: auto;
    height: auto;
}

.remove-color:hover {
    background: linear-gradient(135deg, rgba(255, 65, 108, 0.9), rgba(255, 75, 43, 0.9));
    border-color: rgba(255, 65, 108, 0.6);
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.4);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.color-grid-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.color-grid-vertical::-webkit-scrollbar {
    width: 8px;
}

.color-grid-vertical::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.color-grid-vertical::-webkit-scrollbar-thumb {
    background: rgba(74, 159, 255, 0.6);
    border-radius: 4px;
    margin-top: 15px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    border: 1px solid rgba(148, 190, 255, 0.12);
    transition: transform 0.3s;
    position: relative;
    min-height: 40px;
}

.color-item:hover {
    background: rgba(74, 159, 255, 0.14);
    border-color: rgba(148, 190, 255, 0.22);
}

.color-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border: none;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    transition: all 0.3s ease;
    opacity: 0;
    flex-shrink: 0;
}

.color-item:hover .color-delete-btn {
    opacity: 1;
}

.color-delete-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}



.color-id {
    font-weight: bold;
    font-size: 0.65rem;
}

.color-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(148, 190, 255, 0.22);
    border-radius: 8px;
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.65rem;
    width: 100%;
    font-family: monospace;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-input:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.55);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.18);
}

.file-input {
    display: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: var(--panel-strong);
    border-radius: 16px;
    padding: 15px;
    width: 800px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--stroke-strong);
    animation: modalPop 0.18s ease-out;
}

@keyframes modalPop {
    from {
        transform: translateY(10px) scale(0.985);
        opacity: 0.0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 15px;
    text-align: center;
}

.modal-title {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 6px;
}

/* 布局管理样式 */
.layout-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

/* 布局模态框特殊样式 */
#layoutModal .modal-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

#layoutModal .modal-header {
    grid-column: 1 / -1;
    margin-bottom: 15px;
}

#layoutModal .form-group:nth-of-type(1),
#layoutModal .form-group:nth-of-type(2),
#layoutModal .form-group:nth-of-type(3) {
    grid-column: 1;
}

#layoutModal .layout-preview-container {
    grid-column: 2;
    grid-row: 2 / 5;
    margin: 0;
    align-self: start;
}

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

.layout-item {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(148, 190, 255, 0.18);
    border-radius: 10px;
    padding: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.layout-item:hover {
    background: rgba(74, 159, 255, 0.14);
    border-color: rgba(148, 190, 255, 0.28);
}

.layout-item.selected {
    background: rgba(74, 159, 255, 0.22);
    border-color: rgba(148, 190, 255, 0.40);
    box-shadow: 0 0 0 1px rgba(74, 159, 255, 0.18), 0 14px 28px rgba(0, 0, 0, 0.35);
}

.layout-preview {
    margin-bottom: 6px;
}

.layout-thumbnail {
    width: 100%;
    height: 0;
    padding-bottom: 128.57%; /* 9/7 = 1.2857 */
    background: rgba(0, 0, 0, 0.22);
    border: 1px dashed rgba(148, 190, 255, 0.28);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.layout-thumbnail > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.layout-thumbnail.default-layout {
    background: linear-gradient(45deg, rgba(74, 159, 255, 0.1) 25%, transparent 25%), 
                linear-gradient(-45deg, rgba(74, 159, 255, 0.1) 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, rgba(74, 159, 255, 0.1) 75%), 
                linear-gradient(-45deg, transparent 75%, rgba(74, 159, 255, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.layout-thumbnail span {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.layout-info {
    text-align: center;
}

.layout-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 3px;
}

.layout-description {
    font-size: 0.8rem;
    color: var(--muted);
}

/* 布局空状态样式 */
.layout-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(148, 190, 255, 0.22);
    border-radius: 8px;
}

.layout-empty-state .empty-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.layout-empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 8px;
}

.layout-empty-state .empty-description {
    font-size: 0.9rem;
    color: var(--muted);
}

.layout-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.layout-item:hover .layout-actions {
    opacity: 1;
}

.layout-preview-container {
    margin: 15px 0;
    flex: 0 0 300px;
}

.layout-preview-canvas {
    width: 100%;
    height: 0;
    padding-bottom: 148.57%; /* 9/7 = 1.2857 */
    background: rgba(0, 0, 0, 0.16);
    border: 1px dashed rgba(148, 190, 255, 0.28);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.layout-help {
    margin-top: 5px;
    color: var(--muted);
}

.layout-help small {
    font-size: 0.8rem;
}

.preview-bottle {
    position: absolute;
    width: 15px;
    height: 35px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
}

.preview-bottle.colored {
    background: #FF8C00;
}

.preview-bottle.normal {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.preview-bottle.ad {
    background: rgba(255, 215, 0, 0.6);
    border: 1px dashed rgba(255, 215, 0, 0.8);
}

.preview-bottle.has-order {
    background: rgba(74, 159, 255, 0.7) !important;
    border: 2px solid rgba(74, 159, 255, 0.9) !important;
    box-shadow: 0 0 8px rgba(74, 159, 255, 0.5) !important;
}

.preview-bottle.colored.has-order {
    background: rgba(74, 159, 255, 0.7) !important;
    border: 2px solid rgba(74, 159, 255, 0.9) !important;
}

.preview-bottle.normal.has-order {
    background: rgba(74, 159, 255, 0.7) !important;
    border: 2px solid rgba(74, 159, 255, 0.9) !important;
}

.preview-bottle.ad.has-order {
    background: rgba(74, 159, 255, 0.7) !important;
    border: 2px solid rgba(74, 159, 255, 0.9) !important;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: var(--muted);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(148, 190, 255, 0.22);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.85rem;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(78, 205, 196, 0.55);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.18);
}

.form-group textarea {
    min-height: 50px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    align-items: center;
    grid-column: 1 / -1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(74, 159, 255, 0.2);
    flex-wrap: nowrap;
}

.modal-actions .btn {
    min-width: 120px;
    padding: 10px 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.modal-buttons button {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.8rem;
}

.btn-cancel {
    background: rgba(255, 75, 43, 0.3);
    color: white;
}

.btn-confirm {
    background: linear-gradient(to right, #00b09b, #96c93d);
    color: white;
}

.color-control-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    width: 90px;
}

.color-controls-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    opacity: 1;
}

.color-controls-modal .count-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 159, 255, 0.3);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.color-controls-modal .count-btn:hover {
    background: rgba(74, 159, 255, 0.5);
    transform: scale(1.1);
}

.color-preview-modal {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin: 6px 0;
    position: relative;
}

.color-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #4ECDC4;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.7rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.color-name {
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
}

.count-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 159, 255, 0.3);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.count-btn:hover {
    background: rgba(74, 159, 255, 0.5);
    transform: scale(1.1);
}

.count-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#colorControls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    justify-items: center;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(74, 159, 255, 0.3);
}

#colorControls::-webkit-scrollbar {
    width: 8px;
}

#colorControls::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

#colorControls::-webkit-scrollbar-thumb {
    background: rgba(74, 159, 255, 0.5);
    border-radius: 4px;
}

#colorControls::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 159, 255, 0.7);
}

.color-count {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.total-count {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 20px;
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.total-count i {
    margin-right: 10px;
    color: #4ECDC4;
}



.validation-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 5px;
    text-align: center;
    display: none;
}

/* 通用警告框样式 */
.alert-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(255, 107, 107, 0.95);
    border: 1px solid #ff4757;
    border-radius: 8px;
    padding: 15px 20px;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.alert-box.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 500;
}

.alert-icon {
    font-size: 1.2rem;
    color: #fff;
}

.alert-message {
    font-size: 0.9rem;
    line-height: 1.4;
}



.help-icon {
    width: 40px;
    height: 40px;
    background: rgba(74, 159, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5rem;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(148, 190, 255, 0.22);
}

.help-icon:hover {
    background: rgba(74, 159, 255, 0.24);
    transform: scale(1.1);
}

.tooltip {
    position: absolute;
    top: 50px;
    right: 0;
    background: var(--panel-strong);
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-lg);
    padding: 20px;
    width: 300px;
    z-index: 1001;
    box-shadow: var(--shadow-md);
    display: none;
}

.tooltip h3 {
    color: var(--accent);
    margin-bottom: 10px;
}

.tooltip ul {
    padding-left: 20px;
}

.tooltip li {
    margin-bottom: 8px;
    color: var(--muted);
}



/* 确认弹窗样式 */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.confirm-modal.show {
    display: flex;
}

.confirm-content {
    background: var(--panel-strong);
    border: 1px solid var(--stroke-strong);
    border-radius: var(--radius-lg);
    padding: 0;
    width: 400px;
    max-width: 90vw;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: confirmSlideIn 0.3s ease;
}

@keyframes confirmSlideIn {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(74, 159, 255, 0.3);
}

.confirm-header i {
    font-size: 1.5rem;
    color: #FFE66D;
}

.confirm-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.confirm-body {
    padding: 20px 25px;
}

.confirm-body p {
    margin: 0;
    color: #e6e6e6;
    font-size: 1rem;
    line-height: 1.5;
}

.confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 25px 20px;
    border-top: 1px solid rgba(74, 159, 255, 0.3);
}

.confirm-footer .btn {
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.confirm-footer .btn-secondary {
    background: rgba(108, 117, 125, 0.3);
    color: #e6e6e6;
    border: 1px solid rgba(108, 117, 125, 0.5);
}

.confirm-footer .btn-secondary:hover {
    background: rgba(108, 117, 125, 0.5);
}

.confirm-footer .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: 1px solid #dc3545;
}

.confirm-footer .btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
