:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --success: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100svh; /* Prevents phantom scrolling from mobile browser UI */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background animated blobs for premium feel */
.background-elements {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px; height: 400px;
    background: #4f46e5;
    border-radius: 50%;
    top: -10%; left: -5%;
}

.blob-2 {
    width: 500px; height: 500px;
    background: #0ea5e9;
    border-radius: 50%;
    bottom: -15%; right: -10%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.controls {
    display: flex;
    gap: 15px;
}

button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

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

.primary-btn:not(:disabled):hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

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

.warning-btn:not(:disabled):hover {
    background: var(--warning-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.4);
}

.status-panel {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px 20px;
}

#statusText {
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.3s ease;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-box {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.stat-box.warning-box {
    border-color: rgba(245, 158, 11, 0.3);
}

.stat-val {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.file-list-container {
    max-height: 250px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
}

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

.file-list-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.file-list {
    list-style: none;
}

.file-list li {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-list li:last-child {
    border-bottom: none;
}

.file-name {
    font-weight: 500;
    word-break: break-all;
    margin-right: 15px;
}

.file-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.file-badge.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}
