body {
    margin: 0;
    height: 100vh;
    font-family: Arial, sans-serif;
    display: flex;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.left-panel {
    width: 250px;
    background: #f4f4f4;
    border-right: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

.left-panel h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
    position: sticky;
    top: 0;
    background: #f4f4f4;
    padding: 10px 0;
    z-index: 10;
}

.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    position: relative;
}

.drop-area {
    border: 2px dashed #aaa;
    border-radius: 8px;
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.2em;
    transition: background 0.2s;
    background: #fafafa;
    position: absolute;
    top: 10%;
    left: 10%;
    user-select: none;
}

.drop-area.dragover {
    background: #e0f7fa;
    border-color: #26c6da;
    color: #26c6da;
}

#preview-img {
    max-width: 100%;
    max-height: 100%;
    display: none;
}

.watermark-preview-container {
    margin-top: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: 40vh;
    margin-bottom: 15px;
}

.watermark-preview-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    position: sticky;
    top: 0;
    background: #f4f4f4;
    padding: 5px 0;
    z-index: 5;
}

.watermark-option {
    margin-bottom: 15px;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.watermark-option:hover {
    border-color: #26c6da;
    background: #f0f9ff;
}

.watermark-option.selected {
    border-color: #26c6da;
    background: #e0f7fa;
}

.watermark-preview {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 8px;
    border-radius: 4px;
}

.watermark-option p {
    text-align: center;
    margin: 0;
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}

.watermark-controls {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    position: sticky;
    bottom: 0;
    z-index: 15;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.control-group span {
    font-size: 0.9em;
    color: #666;
}

.remove-btn {
    width: 100%;
    padding: 8px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.remove-btn:hover {
    background: #cc3333;
}

.save-btn {
    width: 100%;
    padding: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 10px;
}

.save-btn:hover {
    background: #45a049;
}

.save-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 150px;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: #f0f0f0;
}

.watermark-overlay {
    position: absolute;
    cursor: move;
    user-select: none;
    border: 2px dashed #26c6da;
    min-width: 50px;
    min-height: 50px;
}

.watermark-overlay img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    object-fit: contain;
    object-position: center;
}

.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #26c6da;
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
}

.resize-handle.top-left {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.resize-handle.top-right {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.resize-handle.bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

.rotate-handle {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #ff6b35;
    border: 2px solid white;
    border-radius: 50%;
    cursor: grab;
}

.rotate-handle:active {
    cursor: grabbing;
}
