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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

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

.app-layout {
    display: flex;
    width: 100%;
}

.left-sidebar {
    width: 320px;
    background: #f8f9ff;
    padding: 30px 25px;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 2px solid #e0e0e0;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.left-sidebar.collapsed {
    transform: translateX(-320px);
}

.sidebar-toggle {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.sidebar-toggle:hover {
    background: #667eea;
}

.sidebar-toggle:hover svg {
    stroke: white;
}

.sidebar-toggle svg {
    stroke: #667eea;
    transition: stroke 0.3s ease;
}

.sidebar-expand {
    position: fixed;
    left: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    background: #667eea;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.sidebar-expand:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.sidebar-expand svg {
    stroke: white;
}

.left-sidebar::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.sidebar-title {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.sidebar-subtitle {
    color: #667eea;
    font-size: 1.05em;
    font-weight: 600;
    margin: 20px 0 15px 0;
}

.sidebar-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
}

.sidebar-actions {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-block {
    width: 100%;
}

.left-sidebar .control-group {
    margin-bottom: 20px;
}

.left-sidebar .control-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 1em;
}

.left-sidebar .control-group select,
.left-sidebar .control-group input[type="range"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.left-sidebar .control-group select:focus {
    outline: none;
    border-color: #667eea;
}

.left-sidebar .control-group input[type="range"] {
    padding: 0;
    height: 8px;
    background: #ddd;
    cursor: pointer;
}

.left-sidebar .control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.left-sidebar .control-group-small {
    margin-bottom: 15px;
}

.left-sidebar .control-group-small label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.left-sidebar .control-group-small input[type="range"] {
    width: 100%;
    padding: 0;
    height: 6px;
    background: #ddd;
    cursor: pointer;
    border: none;
    border-radius: 3px;
}

.left-sidebar .control-group-small input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.left-sidebar .control-group-small input[type="text"],
.left-sidebar .control-group-small input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    transition: border-color 0.3s;
    font-family: monospace;
}

.left-sidebar .control-group-small input[type="text"]:focus,
.left-sidebar .control-group-small input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.main-content {
    flex: 1;
    margin-left: 320px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
}

header p {
    font-size: 1.05em;
    opacity: 0.95;
}

.upload-section {
    margin: 40px;
    margin-bottom: 20px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: #e8ebff;
    transform: scale(1.02);
}

.upload-area svg {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.upload-area .hint {
    font-size: 0.9em;
    color: #666;
}

#fileInput {
    display: none;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f2ff;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

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

.preview-section {
    margin: 0 40px 40px 40px;
}

.view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.toggle-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #f0f2ff;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
}

.preview-container {
    position: relative;
}

/* 对比滑块视图 */
.comparison-slider {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 15px;
    overflow: visible;
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    user-select: none;
    cursor: ew-resize;
}

.comparison-canvas {
    display: block;
    width: 100%;
    height: auto;
}

.comparison-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.comparison-overlay canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: 100%;
}

.comparison-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
}

.divider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.divider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(102, 126, 234, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.divider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(102, 126, 234, 0.9);
}

.divider-handle svg {
    width: 24px;
    height: 24px;
}

.comparison-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 0 10px;
    font-size: 0.95em;
    color: #666;
    font-weight: 500;
}

.label-left {
    text-align: left;
}

.label-right {
    text-align: right;
}

/* 并排视图 */
.side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.preview-box {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 15px;
}

.preview-box h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.preview-box canvas {
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.batch-section {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    margin: 0 40px 40px 40px;
}

.batch-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
}

#batchList {
    margin-bottom: 20px;
}

.batch-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.batch-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.batch-item.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.batch-item.processing {
    border-left: 4px solid #667eea;
}

.batch-item.completed {
    border-left: 4px solid #4caf50;
}

.label-red {
    color: #e74c3c;
}

.label-green {
    color: #27ae60;
}

.label-blue {
    color: #3498db;
}

.slider-red::-webkit-slider-thumb {
    background: #e74c3c !important;
}

.slider-green::-webkit-slider-thumb {
    background: #27ae60 !important;
}

.slider-blue::-webkit-slider-thumb {
    background: #3498db !important;
}

footer {
    background: #f8f9ff;
    padding: 20px;
    text-align: center;
    color: #666;
    border-top: 2px solid #e0e0e0;
    margin-top: auto;
}

.histogram-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

#histogramCanvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.histogram-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    font-size: 0.85em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

.legend-red {
    background: rgba(255, 99, 132, 0.8);
}

.legend-green {
    background: rgba(75, 192, 75, 0.8);
}

.legend-blue {
    background: rgba(54, 162, 235, 0.8);
}

.legend-luma {
    background: rgba(200, 200, 200, 0.8);
}

.curves-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.curve-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.curve-tab {
    flex: 1;
    padding: 8px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.curve-tab:hover {
    background: #f0f2ff;
}

.curve-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.curve-tab[data-channel="r"].active {
    background: #e74c3c;
    border-color: #e74c3c;
}

.curve-tab[data-channel="g"].active {
    background: #27ae60;
    border-color: #27ae60;
}

.curve-tab[data-channel="b"].active {
    background: #3498db;
    border-color: #3498db;
}

#curveCanvas {
    width: 100%;
    height: auto;
    display: block;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: crosshair;
    background: #f8f9fa;
}

.curve-controls {
    margin-top: 10px;
}

.hsl-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.hsl-color-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.hsl-color-btn {
    padding: 10px;
    border: 3px solid transparent;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hsl-color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.hsl-color-btn.active {
    border-color: white;
    box-shadow: 0 0 0 2px #667eea, 0 4px 12px rgba(0,0,0,0.3);
    transform: scale(1.08);
}

.hsl-controls {
    margin-bottom: 10px;
}

.color-grading-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.grading-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.grading-tab {
    flex: 1;
    padding: 8px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grading-tab:hover {
    background: #f0f2ff;
}

.grading-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.grading-wheels {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

#colorWheelCanvas {
    width: 200px;
    height: 200px;
    cursor: crosshair;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wheel-info {
    margin-top: 10px;
    font-size: 0.85em;
    color: #666;
    text-align: center;
}

.grading-controls {
    margin-bottom: 10px;
}

/* ========== 移动端优化 ========== */

/* 平板端 (768px - 1024px) */
@media (max-width: 1024px) {
    .left-sidebar {
        width: 280px;
    }

    .main-content {
        margin-left: 280px;
    }

    .left-sidebar.collapsed + .sidebar-expand + .main-content {
        margin-left: 0;
    }
}

/* 手机端 (< 768px) */
@media (max-width: 768px) {
    /* 侧边栏改为底部抽屉式 - 降低高度 */
    .left-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: 55vh;
        max-height: 500px;
        transform: translateY(calc(100% - 60px));
        border-right: none;
        border-top: 2px solid #e0e0e0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        padding: 25px 15px 15px 15px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .left-sidebar.collapsed {
        transform: translateY(0);
    }

    /* 顶部拖动条 - 更明显 */
    .left-sidebar::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 5px;
        background: #94a3b8;
        border-radius: 3px;
        cursor: grab;
    }

    /* 侧边栏标题在收起时可见 */
    .sidebar-title {
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
        padding: 10px 0;
        margin-top: 5px;
        margin-bottom: 15px;
        font-size: 1.1em;
    }

    .sidebar-subtitle {
        font-size: 0.9em;
        margin-bottom: 12px;
    }

    /* 主内容区占满屏幕 */
    .main-content {
        margin-left: 0;
        padding: 15px 10px 100px 10px;
        width: 100%;
    }

    /* 侧边栏切换按钮改为底部浮动按钮 */
    .sidebar-toggle {
        display: none;
    }

    .sidebar-expand {
        display: none !important;
    }

    /* 控制组优化 - 增大触摸目标 */
    .control-group {
        margin-bottom: 15px;
    }

    .control-group label {
        font-size: 0.85em;
        margin-bottom: 5px;
        display: block;
    }

    .control-group-small {
        margin-bottom: 12px;
    }

    .control-group-small label {
        font-size: 0.8em;
        margin-bottom: 4px;
    }

    input[type="range"] {
        height: 40px;
        cursor: pointer;
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    input[type="range"]::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }

    /* 按钮优化 - 最小44px触摸目标 */
    .btn {
        min-height: 48px;
        font-size: 1em;
        padding: 12px 20px;
    }

    .btn-block {
        margin-bottom: 12px;
    }

    /* 选择框优化 */
    select {
        min-height: 48px;
        font-size: 1em;
        padding: 12px;
    }

    /* 图片预览区优化 */
    .preview-section {
        margin-bottom: 100px; /* 为底部按钮留空间 */
    }

    /* 上传区域优化 - 更突出 */
    .upload-area {
        padding: 40px 20px;
        margin: 20px 0;
        border: 3px dashed #667eea;
        border-radius: 15px;
        background: linear-gradient(135deg, #f8f9ff 0%, #e8ecff 100%);
        min-height: 200px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .upload-area h2 {
        font-size: 1.1em;
        margin: 0;
    }

    .upload-area p {
        font-size: 0.9em;
        margin: 5px 0;
    }

    /* 视图切换按钮固定在顶部 */
    .view-toggle {
        position: sticky;
        top: 10px;
        z-index: 100;
        background: white;
        padding: 10px;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
        margin-bottom: 15px;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .toggle-btn {
        flex: 1;
        min-width: 100px;
        min-height: 48px;
        font-size: 0.9em;
        white-space: nowrap;
    }

    canvas {
        max-width: 100%;
        height: auto;
    }

    /* 对比视图优化 */
    .comparison-slider {
        height: 50vh;
        min-height: 300px;
        padding: 15px;
    }

    .comparison-wrapper {
        border-radius: 8px;
    }

    .divider-handle {
        width: 56px;
        height: 56px;
    }

    .side-by-side {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .preview-box {
        padding: 15px;
    }

    .preview-box h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    /* 批量处理优化 */
    .batch-section {
        margin: 0 10px 20px 10px;
        padding: 20px 15px;
    }

    .batch-section h3 {
        font-size: 1.1em;
        margin-bottom: 15px;
    }

    .batch-item {
        padding: 15px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        min-height: 80px;
    }

    .batch-item img {
        width: 70px !important;
        height: 70px !important;
        margin-right: 0 !important;
        flex-shrink: 0;
    }

    .batch-item > div {
        flex: 1;
        min-width: 0;
    }

    .batch-item > div > div {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.9em;
    }

    /* 曲线编辑器优化 */
    .curve-editor {
        padding: 15px;
    }

    #curveCanvas {
        width: 100%;
        height: auto;
        min-height: 250px;
    }

    /* HSL色彩按钮优化 */
    .hsl-colors {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .hsl-color-btn {
        min-height: 44px;
        font-size: 0.9em;
    }

    /* 色彩轮优化 */
    #colorWheelCanvas {
        width: 180px;
        height: 180px;
    }

    /* 直方图优化 */
    .histogram-container {
        padding: 12px;
    }

    #histogramCanvas {
        width: 100%;
        height: auto;
    }

    /* 折叠区域优化 */
    .sidebar-divider {
        margin: 20px 0;
    }

    /* 输入框优化 */
    input[type="text"],
    input[type="password"] {
        min-height: 48px;
        font-size: 1em;
        padding: 12px;
    }

    /* 标签页优化 */
    .curve-tabs,
    .grading-tabs {
        gap: 8px;
    }

    .curve-tab,
    .grading-tab {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 0.95em;
    }

    /* 遮罩层 - 当侧边栏打开时 */
    .left-sidebar.collapsed::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* 侧边栏内容分组折叠优化 */
    .sidebar-divider {
        margin: 15px 0;
        border-color: #e0e0e0;
    }

    /* 滤镜选择器优化 */
    select#lutSelect {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
    }

    /* 强度滑块优化 */
    .control-group:has(#intensitySlider) {
        background: #f8f9ff;
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 15px;
    }
}

/* 小屏手机优化 (< 375px) */
@media (max-width: 375px) {
    .left-sidebar {
        height: 60vh;
        max-height: 450px;
        padding: 25px 12px 12px 12px;
    }

    .sidebar-title {
        font-size: 1.1em;
    }

    .btn {
        min-height: 44px;
        font-size: 0.95em;
        padding: 10px 16px;
    }

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

    .control-group label {
        font-size: 0.85em;
    }

    .batch-item {
        padding: 12px;
    }

    .batch-item img {
        width: 60px !important;
        height: 60px !important;
    }

    .divider-handle {
        width: 48px;
        height: 48px;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .left-sidebar {
        height: 80vh;
        max-height: none;
    }

    .left-sidebar.collapsed ~ .sidebar-expand {
        bottom: calc(80vh + 20px);
    }

    .comparison-slider {
        height: 70vh;
    }
}

/* 小屏手机 (< 375px) */
@media (max-width: 375px) {
    .left-sidebar {
        height: 80vh;
        padding: 15px 12px;
    }

    .sidebar-title {
        font-size: 1.2em;
    }

    .btn {
        font-size: 0.9em;
        padding: 10px 16px;
    }

    .hsl-colors {
        grid-template-columns: repeat(3, 1fr);
    }

    #colorWheelCanvas {
        width: 150px;
        height: 150px;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .left-sidebar {
        height: 90vh;
    }

    .comparison-slider {
        height: 80vh;
    }
}

/* 旧的媒体查询 - 保留作为后备 */
@media (max-width: 1024px) {
    .button-group {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.8em;
    }
}
