:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #ec4899;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: #06b6d4;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 100px) scale(1.1); }
}

/* Container */
.glass-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

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

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

/* Upload Grid */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.icon-circle {
    background: var(--primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.02);
}

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

.upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.file-count {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* Buttons */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.btn {
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:not(:disabled):hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-success {
    background: var(--success);
    color: white;
}

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

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

.loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.is-loading {
    cursor: wait;
}

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

/* Results Section */
.results-section {
    margin-top: 40px;
    animation: fadeIn 0.5s ease;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stats {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #c084fc);
    transition: width 0.3s ease;
}

/* Table */
.results-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-muted);
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(4px);
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 12px 16px;
    border-top: 1px solid var(--glass-border);
}

.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-not-found { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.status-failed { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* Log Section */
.log-section {
    margin-top: 32px;
}

summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

summary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.log-content {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    font-family: monospace;
    font-size: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 8px;
    border: 1px solid var(--glass-border);
}

.log-item {
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 2px;
}

.log-error { color: #f87171; }
.log-success { color: #34d399; }
.log-info { color: #94a3b8; }

footer {
    margin-top: 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
    .glass-container {
        padding: 20px;
        margin: 20px;
    }
    h1 {
        font-size: 2rem;
    }
}
