:root {
    --bg-color: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --card-bg: #ffffff;
    --border-color: #dee2e6;
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --error-bg: #f8d7da;
    --error-text: #842029;
    --error-border: #f5c2c7;
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 1rem;
    padding: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #f8f9fa;
    border: 2px dashed #adb5bd;
    border-radius: 8px;
    transition: var(--transition);
}

.file-drop-area.dragover {
    border-color: var(--primary-color);
    background: #e9ecef;
}

.file-drop-area.has-file {
    border-color: #198754;
    background: #e8f5e9;
}

.file-drop-area .icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.file-message {
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

.primary-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.secondary-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.secondary-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

.error-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--error-text);
}

.error-icon {
    font-size: 1.2rem;
}

.results-section {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

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

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-primary);
    background: #f8f9fa;
    font-size: 0.9rem;
}

tbody tr:hover {
    background: #f8f9fa;
}

@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
        margin: 0;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }
}
