:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #818cf8;
    --glass: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    max-width: 1000px;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.accent {
    color: var(--accent);
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Drop Zone */
.drop-zone {
    background: var(--glass);
    border: 2px dashed rgba(148, 163, 184, 0.3);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

.drop-zone-content .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.drop-zone-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.drop-zone-content span {
    color: var(--primary);
    font-weight: 600;
}

/* Previews */
.preview-section {
    margin-top: 2rem;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.previews {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.preview-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.preview-card h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0f172a;
    border-radius: 0.5rem;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.img-info {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Loader */
.processing .loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Buttons */
.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1rem;
    border: none;
}

.btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn.secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
}

.hidden {
    display: none !important;
}

/* Controls */
.controls-section {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    animation: fadeIn 0.8s ease-out;
}

.control-group {
    background: var(--glass);
    padding: 1rem 2rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-group label {
    font-weight: 600;
    color: var(--text-muted);
}

.scale-selector {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 0.75rem;
}

.radio-label {
    cursor: pointer;
    position: relative;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label span {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.875rem;
}

.radio-label input:checked + span {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.radio-label:hover span:not(input:checked + span) {
    background: rgba(255, 255, 255, 0.05);
}

.file-support {
    margin-top: 0.5rem;
    font-size: 0.9rem !important;
    opacity: 0.7;
}

.file-name-display {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    font-size: 1.1rem;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .previews {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2.5rem;
    }
}
