:root {
    --primary: #1e90ff;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --dark: #212529;
    --light: #f8f9fa;
    --shadow: 0 4px 15px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: var(--dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.dashboard {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.header {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
    position: relative;
}

h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    color: #d1e0ff;
    font-size: 1.2em;
}

.main-content {
    display: grid;
    grid-template-columns: minmax(300px, 2fr) 3fr;
    gap: 30px;
}

.input-panel {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.drop-zone {
    border: 3px dashed var(--primary);
    border-radius: 10px;
    padding: 50px;
    text-align: center;
    cursor: pointer;
    background: var(--light);
    transition: var(--transition);
}

.drop-zone:hover, .drop-zone.dragover {
    background: #e9ecef;
    border-color: var(--secondary);
    transform: scale(1.02);
}

.drop-icon {
    font-size: 3em;
    color: var(--primary);
    margin-bottom: 15px;
}

.file-info {
    display: none;
    background: #e9f7ff;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 0.95em;
    border-left: 4px solid var(--primary);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: var(--transition);
}

.btn:hover {
    background: #1a75cc;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn:disabled {
    background: var(--secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary { background: var(--secondary); }
.btn-secondary:hover { background: #5a6268; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #218838; }
.btn-info { background: var(--info); }
.btn-info:hover { background: #138496; }

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-bar {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 250px;
    font-size: 1em;
    transition: var(--transition);
}

.search-bar:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--light);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary);
}

.results-content {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.duplicate-section, .details-section {
    flex: 1;
    min-width: 300px;
}

.duplicate-table {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.duplicate-item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.duplicate-item:hover {
    background: #f1f5f9;
}

.duplicate-item:last-child { border-bottom: none; }

.count { color: #dc3545; font-weight: bold; }
.locations { color: var(--secondary); font-size: 0.9em; margin-top: 5px; }

.details-list {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.charts-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.chart-wrapper {
    background: white;
    padding: 15px;
    border-radius: 8px;
    height: 300px;
    box-shadow: var(--shadow);
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.results-panel {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 25px;
}

.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    padding: 5px;
    border-radius: 5px;
}

.lang-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lang-btn.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .input-panel {
        position: relative;
        top: 0;
    }

    .charts-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}