/* Modern Reset & Base */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --dark-bg: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--dark-bg);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    overflow: hidden;
}

/* Glassmorphism Container */
.app-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

/* Glow Effects */
.app-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #818cf8, #e879f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1px;
}

p.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 3rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.01);
}

.icon-upload {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary);
}

.drop-text {
    font-weight: 500;
    font-size: 1.2rem;
}

.drop-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Status & Results */
.status-area {
    margin-top: 2rem;
    display: none;
    /* Hidden by default */
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--text-muted);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

/* Results List */
.results-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar styling */
.results-container::-webkit-scrollbar {
    width: 6px;
}

.results-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.results-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.result-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    /* Name | Stats | Button */
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.4s ease-out;
}

.result-info {
    text-align: left;
    overflow: hidden;
}

.file-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 200px;
}

.status-badge {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--glass-border);
    color: var(--text-muted);
}

.result-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.btn-small {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-small:hover {
    background: var(--primary-hover);
}

.btn-small.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: var(--text-muted);
}

/* Summary Actions */
.batch-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    display: none;
    /* Hidden until results exist */
}

/* Animations */
@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input[type="file"] {
    display: none;
}