* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
    background-color: #f0f0f0;
    color: #222;
    transition: background-color 0.3s, color 0.3s;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

main {
    height: calc(100vh - 100px);
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    background: #ddd;
    color: #888;
}

.floating-panel {
    position: relative;
    width: 280px;
    height: 100%;
    background: #fff;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

    .floating-panel h2 {
        margin-top: 0;
        font-size: 1.1rem;
    }

    .floating-panel label {
        display: block;
        margin-bottom: 12px;
    }

    .floating-panel input[type="range"] {
        width: 100%;
    }

#compare-container {
    flex: 1;
    position: relative;
    height: 100%;
}

    #compare-container .drop-zone {
        width: 100%;
        height: 100%;
    }

#compare-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: red;
    cursor: ew-resize;
    z-index: 10;
}

.drop-zone {
    position: relative;
    border: 2px dashed #999;
    border-radius: 8px;
    padding: 4px;
    transition: border-color 0.3s, background-color 0.3s;
}

    .drop-zone.dragover {
        border-color: #007bff;
        background-color: #e0f0ff;
    }

    .drop-zone.hidden-border {
        border: none;
    }

.drop-zone-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

    .drop-zone-message.hidden {
        display: none;
    }

button {
    padding: 6px 12px;
    font-size: 1rem;
    margin: 0 5px;
}

#dark-mode-toggle {
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

body.dark-mode {
    background-color: #222;
    color: #eee;
}

    body.dark-mode header {
        background-color: #333;
        color: #eee;
    }

    body.dark-mode main {
        background-color: #999;
        color: #ccc;
    }

    body.dark-mode .drop-zone {
        border: 2px dashed #ccc;
    }

    body.dark-mode .floating-panel {
        background-color: #333;
        color: #eee;
    }
