:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent: #10b981;
    --glass: rgba(15, 23, 42, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.glass-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 100%);
    z-index: -1;
    animation: pulse 15s infinite alternate linear;
}

@keyframes pulse {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

/* Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

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

.nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item.selector-active {
    color: var(--accent);
    background: rgba(16, 185, 129, 0.1);
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    padding-top: 80px; /* Space for nav */
    z-index: 1;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.icon-logo {
    color: var(--primary);
    width: 40px;
    height: 40px;
}

.logo span {
    color: var(--primary);
}

.subtitle {
    color: var(--text-dim);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

/* Upload Section */
.upload-section {
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 24px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.upload-section:hover, .upload-section.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-content p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    opacity: 0.6;
    background: rgba(0,0,0,0.2);
    padding: 0.4rem 1rem;
    border-radius: 100px;
}

.mode-switch {
    margin: 1rem 0;
}

.selector-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.1);
    transition: all 0.2s;
}

.selector-link:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: scale(1.02);
}

/* Processing Section */
.processing-section {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(12px);
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.stat-item .label {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.stat-item .value {
    font-weight: 600;
    color: var(--primary);
}

.progress-main {
    margin-bottom: 2rem;
}

.progress-track {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 100px;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px var(--primary);
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding-right: 0.5rem;
}

.file-list::-webkit-scrollbar {
    width: 4px;
}

.file-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-name {
    font-size: 0.9rem;
}

.file-status {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-done { color: var(--accent); }
.status-error { color: #f43f5e; }
.status-wait { color: var(--text-dim); }

/* Buttons */
.actions {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 1rem;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

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

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

.btn.primary:not(:disabled):hover {
    background: var(--primary-hover);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

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

.btn.secondary:hover {
    background: rgba(255,255,255,0.1);
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    opacity: 0.5;
}

.spin {
    animation: spin 1s linear infinite;
}

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

@media (max-width: 640px) {
    .container { padding: 1rem; }
    .actions { flex-direction: column; }
    .logo { font-size: 2rem; }
}
