:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.file-drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.file-drop-zone.dragover {
    border-color: var(--success-color);
    background-color: #d1f4e0;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.shortlisted-card {
    border-left: 4px solid var(--success-color);
}

.not-selected-card {
    border-left: 4px solid var(--danger-color);
}

.score-badge {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.score-excellent {
    background-color: var(--success-color);
    color: white;
}

.score-good {
    background-color: var(--info-color);
    color: white;
}

.score-average {
    background-color: var(--warning-color);
    color: black;
}

.score-poor {
    background-color: var(--danger-color);
    color: white;
}

.theme-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

[data-bs-theme="dark"] {
    --primary-color: #4a90e2;
    --success-color: #28a745;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --dark-color: #f8f9fa;
    --light-color: #212529;
}

[data-bs-theme="dark"] body {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .card {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

[data-bs-theme="dark"] .file-drop-zone {
    border-color: #444;
    background-color: #2a2a2a;
}

[data-bs-theme="dark"] .file-drop-zone:hover {
    border-color: var(--primary-color);
    background-color: #333;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-left: 1rem;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

footer {
    margin-top: auto;
}

/* --- Responsive adjustments for smaller screens and zoom levels --- */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    .card {
        margin-bottom: 1rem;
    }
    .score-badge {
        font-size: 1rem;
        padding: 0.3rem 0.8rem;
    }
    .file-drop-zone {
        padding: 2rem;
    }
    .theme-btn {
        top: auto;
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 0.9rem;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .file-drop-zone h6 {
        font-size: 1rem;
    }
    .file-drop-zone p,
    .file-drop-zone small {
        font-size: 0.8rem;
    }
}

/* New: Adjustments for high zoom levels */
@media (max-width: 380px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    .hero-section p.lead {
        font-size: 0.9rem;
    }
    .feature-icon {
        font-size: 1.5rem;
    }
    .card-title {
        font-size: 1.1rem;
    }
    .file-drop-zone {
        padding: 1.5rem;
    }
    .file-drop-zone .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    .form-label, .form-text {
        font-size: 0.8rem;
    }
}
