:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --success-color: #10b981;
    --success-hover: #059669;
    --secondary-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(59,130,246,0.8) 0%, rgba(147,51,234,0.3) 100%); }
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(16,185,129,0.5) 0%, rgba(59,130,246,0.2) 100%); animation-delay: -5s; }
.blob-3 { top: 40%; left: 60%; width: 30vw; height: 30vw; background: radial-gradient(circle, rgba(236,72,153,0.4) 0%, rgba(139,92,246,0.1) 100%); animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, 10%) scale(0.9); }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

header { text-align: center; }
header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
header p { color: var(--text-muted); font-size: 1.1rem; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .upload-layout { grid-template-columns: 1fr; }
}

.upload-section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.drop-zone h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.drop-zone small { color: var(--text-muted); font-size: 0.85rem; }

.batch-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    z-index: 10;
}

.hidden-input { display: none; }

.preview-container {
    margin-top: 1.5rem;
    animation: fadeIn 0.4s ease;
    display: flex;
    justify-content: center;
}

.preview-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    width: 150px;
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.remove-btn:hover { background: rgba(239, 68, 68, 0.8); }

.batch-status {
    display: flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--success-color);
    font-weight: 500;
}

.success-icon { margin-right: 0.5rem; }

.action-panel {
    display: flex;
    justify-content: center;
    padding: 1.5rem !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    z-index: 2;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    width: 100%;
    max-width: 400px;
}

.btn-primary { background: var(--primary-color); color: white; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary { background: rgba(255, 255, 255, 0.1); color: white; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

.btn-success { background: var(--success-color); color: white; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }
.btn-success:hover { background: var(--success-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5); }

.spinner { animation: rotate 2s linear infinite; width: 24px; height: 24px; }
.spinner .path { stroke: rgba(255,255,255,0.8); stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

.result-section { animation: slideUp 0.5s ease; text-align: center; }
.result-header { margin-bottom: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.result-header h2 { font-size: 1.5rem; color: var(--success-color); }

.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
