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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1e1e1e;
    color: #ffffff;
    overflow: hidden;
}

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

.sidebar {
    width: 300px;
    background: #2a2a2a;
    border-right: 1px solid #404040;
    overflow-y: auto;
    padding: 20px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toolbar {
    background: #2a2a2a;
    padding: 15px;
    border-bottom: 1px solid #404040;
    display: flex;
    gap: 10px;
    align-items: center;
}

.canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    position: relative;
    overflow: auto;
}

.btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #005999;
}

.btn-secondary {
    background: #555;
}

.btn-secondary:hover {
    background: #666;
}

.section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 1px solid #404040;
    padding-bottom: 8px;
}

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

.control-label {
    display: block;
    font-size: 12px;
    color: #cccccc;
    margin-bottom: 5px;
}

.slider {
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #404040;
    outline: none;
    margin-bottom: 8px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007acc;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007acc;
    cursor: pointer;
    border: none;
}

.value-display {
    font-size: 11px;
    color: #999;
    text-align: right;
}

.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preset-btn {
    background: #3a3a3a;
    border: 1px solid #555;
    color: white;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: #4a4a4a;
    border-color: #007acc;
}

.histogram {
    width: 100%;
    height: 100px;
    background: #333;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.crop-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.aspect-btn {
    background: #3a3a3a;
    border: 1px solid #555;
    color: white;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.aspect-btn.active {
    background: #007acc;
    border-color: #007acc;
}

.color-grading-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

.color-grading-item {
    background: #333;
    padding: 8px;
    border-radius: 3px;
}

.color-grading-title {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.color-mix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.color-mix-item {
    background: #333;
    padding: 8px;
    border-radius: 3px;
    font-size: 11px;
}

.tone-curve {
    width: 100%;
    height: 150px;
    background: #333;
    border-radius: 4px;
    position: relative;
    margin: 10px 0;
}

#canvas {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    cursor: crosshair;
}

.file-input {
    display: none;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #404040;
    margin-bottom: 15px;
}

.tab {
    background: none;
    border: none;
    color: #999;
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 13px;
}

.tab.active {
    color: white;
    border-bottom-color: #007acc;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.crop-overlay {
    position: absolute;
    border: 2px dashed #007acc;
    display: none;
    cursor: move;
}

.crop-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #007acc;
    cursor: nw-resize;
}

.crop-handle.nw { top: -4px; left: -4px; }
.crop-handle.ne { top: -4px; right: -4px; cursor: ne-resize; }
.crop-handle.sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.crop-handle.se { bottom: -4px; right: -4px; cursor: se-resize; }

.status-bar {
    background: #2a2a2a;
    padding: 5px 15px;
    font-size: 11px;
    color: #999;
    border-top: 1px solid #404040;
}

.image-info-section {
    background: #333;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 11px;
}

.image-info-item {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.image-info-label {
    color: #999;
}

.image-info-value {
    color: #fff;
}

.slider-container {
    position: relative;
}

.slider-reset {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 10px;
    color: #666;
    cursor: pointer;
}

.slider-reset:hover {
    color: #007acc;
}