:root {
    --primary: #0052D4;
    --primary-hover: #0041a8;
    --accent: #1EAF5B;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --badge-bg: #F0F5FF;
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-font-smoothing: antialiased; }
body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    background-image: radial-gradient(at 100% 0%, rgba(0, 82, 212, 0.05) 0px, transparent 50%);
}

/* Header */
header {
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}
.navbar { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.logo { text-decoration: none; display: flex; align-items: center; }
.main-logo { height: 40px; width: auto; display: block; }
.mobile-logo { display: none; }

@media (max-width: 600px) {
    .main-logo { display: none; }
    .mobile-logo { display: block; height: 32px; width: auto; }
}

/* Container & Typography */
.container { max-width: 800px; margin: 3rem auto; padding: 0 1.5rem; text-align: center; }
.header-section { margin-bottom: 3rem; }
h1 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.subtitle { color: var(--text-muted); font-size: 1.1rem; }

/* Drop Zone */
.drop-zone {
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2.5rem;
}
.drop-zone:hover { border-color: var(--primary); background: #fdf2f1; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.drop-icon { font-size: 3rem; margin-bottom: 1rem; }
.drop-text { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.5rem; }
.drop-info { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
#file-input { display: none; }

/* File List */
.file-list-container { margin-bottom: 2.5rem; }
.file-list { display: flex; flex-direction: column; gap: 1rem; }

.file-item {
    background: var(--card-bg);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    text-align: left;
    box-shadow: var(--shadow-sm);
}
.file-item:hover { border-color: var(--primary); transform: translateX(4px); box-shadow: var(--shadow-md); }
.file-item:active { cursor: grabbing; transform: scale(0.98); }
.file-item.dragging { opacity: 0.5; background: #f8fafc; border-style: dashed; }

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.file-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.thumbnail {
    width: 60px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.file-details {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}
.file-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.file-size { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }

.btn-remove {
    background: #fef2f2;
    color: #ef4444;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-remove:hover { background: #fee2e2; transform: scale(1.1); }

.drag-handle { color: #cbd5e1; cursor: grab; font-size: 1.25rem; }

/* Actions Section */
.actions-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modern-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: #f8fafc;
    transition: all 0.2s;
}
.modern-input:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }

.btn-action {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    width: 100%;
}
.btn-action:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4); }
.btn-action:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; opacity: 0.7; }

#status { margin-top: 1rem; font-size: 0.95rem; font-weight: 700; color: var(--primary); }

.btn-text-action {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.btn-text-action:hover { background: var(--badge-bg); }

.btn-clear-data {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-clear-data:hover {
    background: #ffe4e6;
    border-color: #fda4af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
}


@media (max-width: 640px) {
    h1 { font-size: 1.75rem; }
    .container { margin: 1.5rem auto; padding: 0 1rem; }
    .file-item {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    .file-info {
        gap: 0.75rem;
    }
    .thumbnail { width: 40px; height: 55px; border-radius: 4px; }
    .file-name { font-size: 0.9rem; }
    .file-size { font-size: 0.75rem; }
    .btn-remove { width: 30px; height: 30px; font-size: 1.25rem; }
    .file-number { width: 22px; height: 22px; font-size: 0.65rem; }
    .drag-handle { font-size: 1rem; }
}
