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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f0f2f5;
    padding: 30px 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 2px solid #eef2f7;
    margin-bottom: 25px;
}

.header h1 {
    font-size: 2.2rem;
    color: #1a1a2e;
    font-weight: 700;
}

.header p {
    color: #6b7a8f;
    font-size: 1.05rem;
    margin-top: 5px;
}

.upload-box {
    background: #f8f9fc;
    padding: 25px 30px;
    border-radius: 12px;
    border: 1px solid #e4e8ef;
}

.upload-box h2 {
    font-size: 1.3rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.alert {
    background: #fff3cd;
    color: #856404;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 18px;
    border-left: 4px solid #ffc107;
}

.drop-zone {
    border: 2px dashed #c5d0de;
    border-radius: 12px;
    padding: 35px 20px;
    text-align: center;
    position: relative;
    background: #ffffff;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: #4a6cf7;
    background: #f5f8ff;
}

.drop-zone.dragover {
    border-color: #4a6cf7;
    background: #e8f0fe;
}

.drop-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-content .big-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 8px;
}

.drop-content p {
    font-size: 1.1rem;
    color: #1a1a2e;
}

.drop-content .small-text {
    color: #8a9bb0;
    font-size: 0.9rem;
    display: block;
    margin-top: 4px;
}

.file-list-box {
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #e4e8ef;
    min-height: 50px;
}

.file-list-box .placeholder {
    color: #9aabb8;
}

.file-tag {
    display: inline-block;
    background: #eef2f7;
    padding: 6px 16px;
    margin: 3px 8px 3px 0;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #1a1a2e;
}

.file-tag .remove {
    margin-left: 8px;
    color: #d32f2f;
    cursor: pointer;
    font-weight: 700;
}

.btn-process {
    width: 100%;
    background: #28a745;
    color: #ffffff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-process:hover {
    background: #218838;
    box-shadow: 0 4px 14px rgba(40,167,69,0.3);
}

.btn-process:disabled {
    background: #a0b0c0;
    cursor: not-allowed;
}

.btn-download {
    background: #4a6cf7;
    color: #ffffff;
    border: none;
    padding: 12px 35px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 20px auto 0;
}

.btn-download:hover {
    background: #3a5cd9;
    box-shadow: 0 4px 14px rgba(74,108,247,0.3);
}

.loader {
    text-align: center;
    padding: 15px 0;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #eef2f7;
    border-top: 4px solid #4a6cf7;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader p {
    color: #6b7a8f;
    margin-top: 8px;
}

.result-box {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #eef2f7;
}

.result-box h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 15px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat {
    background: #f8f9fc;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e4e8ef;
}

.stat .num {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    color: #4a6cf7;
}

.stat .num.duplicate {
    color: #d32f2f;
}

.stat .num.unique {
    color: #28a745;
}

.stat .label {
    color: #6b7a8f;
    font-size: 0.9rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e4e8ef;
    border-radius: 10px;
    background: #ffffff;
    margin: 15px 0;
}

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

table th {
    background: #f8f9fc;
    color: #1a1a2e;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid #e4e8ef;
    position: sticky;
    top: 0;
    z-index: 2;
}

table td {
    padding: 9px 14px;
    border-bottom: 1px solid #f0f2f5;
}

table tr:hover {
    background: #f8f9fc;
}

table tr.file1 {
    background: #e3f2fd;
}

table tr.file1:hover {
    background: #bbdefb;
}

table tr.file2 {
    background: #fff3e0;
}

table tr.file2:hover {
    background: #ffe0b2;
}

.no-duplicates {
    padding: 30px;
    text-align: center;
    color: #28a745;
    font-size: 1.1rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 500;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.4s ease;
    max-width: 400px;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #d32f2f;
}

.notification.info {
    background: #4a6cf7;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 18px;
    }
    .upload-box {
        padding: 18px;
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .header h1 {
        font-size: 1.6rem;
    }
    .drop-zone {
        padding: 25px 15px;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .stat .num {
        font-size: 1.4rem;
    }
    table {
        font-size: 0.75rem;
    }
    table th,
    table td {
        padding: 6px 8px;
    }
}