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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-section h2,
.results-section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.info {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.info code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f8f9ff;
}

.upload-label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-label svg {
    color: #667eea;
}

.upload-label span {
    display: block;
    font-size: 1rem;
    color: #333;
}

.file-types {
    font-size: 0.875rem !important;
    color: #999 !important;
}

.file-info {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9ff;
    border-radius: 8px;
}

.file-name {
    font-weight: 600;
    color: #667eea;
}

.hidden {
    display: none !important;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    display: block;
    margin: 2rem auto 0;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.loading-section {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.loading-section p {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.stat-sub {
    font-size: 0.85rem;
    opacity: 0.8;
}

.methods-section,
.confidence-section,
.duplicates-section,
.files-section {
    margin-top: 2rem;
}

.methods-section h3,
.confidence-section h3,
.duplicates-section h3,
.files-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.method-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.method-icon {
    font-size: 1.5rem;
}

.method-label {
    flex: 1;
    font-size: 0.9rem;
    color: #666;
}

.method-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

.confidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.confidence-item {
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.confidence-item.high {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.confidence-item.medium-high {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.confidence-item.medium {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.confidence-badge {
    font-weight: 600;
    font-size: 0.9rem;
}

.confidence-range {
    font-size: 0.85rem;
    color: #666;
}

.confidence-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.duplicates-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.duplicate-item {
    padding: 1.5rem;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.duplicate-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.duplicate-number {
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
}

.duplicate-score {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.duplicate-score.high {
    background: #d4edda;
    color: #28a745;
}

.duplicate-score.medium-high {
    background: #fff3cd;
    color: #856404;
}

.duplicate-score.medium {
    background: #f8d7da;
    color: #721c24;
}

.duplicate-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.duplicate-details {
    display: grid;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.duplicate-detail {
    display: flex;
    gap: 0.5rem;
}

.duplicate-detail strong {
    min-width: 80px;
    color: #667eea;
}

.files-info {
    background: #f8f9ff;
    padding: 1.5rem;
    border-radius: 8px;
}

.files-info p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.files-info code {
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

.files-path {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    font-weight: 600;
}

.error-section {
    text-align: center;
}

.error-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.error-card h2 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-card p {
    color: #666;
    margin-bottom: 2rem;
}
