:root {
    --bg: #0f0f13;
    --card: #1a1a20;
    --primary: #6c5ce7;
    --text: #ffffff;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container { width: 100%; max-width: 800px; padding: 20px; text-align: center; }

.tool-card {
    background: var(--card);
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.btn {
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-block;
    transition: 0.3s;
    border: none;
    font-weight: bold;
}

.btn-primary { background: var(--primary); margin-top: 20px; }
.btn:hover { opacity: 0.9; transform: scale(1.05); }

input[type="file"] { display: none; }

.preview-area {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.image-box {
    width: 45%;
    min-height: 200px;
    background: #000;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

img { width: 100%; height: auto; display: block; }

/* Loader */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 40%; left: 45%;
    display: none;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }