body {
    font-family: "Inter", sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    padding-top: 70px; /* Account for header only */
}
/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* Main Content */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

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

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #1d4ed8;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-secondary {
    background: white;
    color: #1d4ed8;
    border: 1px solid #1d4ed8;
}

.btn-secondary:hover {
    background: #1d4ed8;
    color: white;
}

.btn-danger {
    background: white;
    color: #ef4444;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.section-header {
    background: #1d4ed8;
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.section-header .subtitle {
    margin-left: auto;
    font-size: 0.875rem;
    opacity: 0.9;
}

.upload-content {
    padding: 2rem;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    background: #fafbff;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #1d4ed8;
    background: #f3f4f6;
}

.upload-icon {
    width: 96px;
    height: 96px;
    font-size: 96px;
    margin: 0 auto 1.5rem;
    color: #1d4ed8;
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: #64748b;
    margin-bottom: 2rem;
}

.file-formats {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.format-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.format-pdf {
    background: #1d4ed8;
    color: white;
}

.format-doc {
    background: #10b981;
    color: white;
}

.format-docx {
    background: #3b82f6;
    color: white;
}

.format-txt {
    background: #f59e0b;
    color: white;
}

.file-size-limit {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Form Styles */
.form-section {
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.required {
    color: #ef4444;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.file-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
}

.file-input::file-selector-button {
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-input::file-selector-button:hover {
    background: #e5e7eb;
}

/* Info Section */
.info-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 2rem;
    color: #64748b;
    font-size: 0.875rem;
}

.info-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Features Section */
.features-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    /* padding-top: 2rem;
    border-top: 1px solid #e5e7eb; */
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Analyze Button */
.analyze-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.analyze-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
}

.analyze-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Candidates Section */
.candidates-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.candidates-header {
    background: #1d4ed8;
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.candidates-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.candidates-table {
    width: 100%;
    border-collapse: collapse;
}

.candidates-table th {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.candidates-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    vertical-align: middle;
}

.candidates-table tr:nth-child(even) {
    background: #f8fafc;
}

.candidate-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.candidate-email {
    color: #64748b;
    font-size: 0.8125rem;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.8125rem;
}

.file-size {
    background: #22d3ee;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.status-badge {
    background: #dcfce7;
    color: #166534;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: fit-content;
}

.upload-date {
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.view-btn {
    background: white;
    color: #1d4ed8;
    border: 1px solid #1d4ed8;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 32px;
    height: 32px;
}

.view-btn:hover {
    background: #f3f4f6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .features-section {
        grid-template-columns: 1fr;
    }

    .main-container {
        padding: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .candidates-table {
        font-size: 0.75rem;
    }

    .candidates-table th,
    .candidates-table td {
        padding: 0.75rem 0.5rem;
    }

    /* Footer centering for small screens */
    .footer,
    .footer-content,
    .footer-brand {
        text-align: center !important;
    }
    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}
@media (max-width: 768px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    .candidates-table {
        min-width: 600px;
    }
}

#fileInfo .alert-info {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
    border: 1.5px solid #bee5eb !important;
    border-radius: 8px !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    box-shadow: none !important;
}
#fileInfo .alert-success {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1.5px solid #c3e6cb !important;
    border-radius: 8px !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    box-shadow: none !important;
}
#fileInfo .alert-danger {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1.5px solid #f5c6cb !important;
    border-radius: 8px !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    min-height: 44px !important;
    box-shadow: none !important;
}
#fileInfo strong, #fileInfo #fileName {
    text-align: left;
    font-size: 1rem;
}
#fileInfo #fileName {
    margin-right: 1rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    color: inherit;
}
#fileInfo .btn-close {
    margin-left: auto;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    color: #6c757d !important;
    cursor: pointer !important;
    transition: color 0.2s !important;
    opacity: 0.7 !important;
}
#fileInfo .btn-close:hover {
    color: #343a40 !important;
    opacity: 1 !important;
    background: transparent !important;
}

/* Toast/Toaster styles for success and danger */
.toast-message {
    position: fixed;
    top: 2rem;
    right: 2rem;
    min-width: 280px;
    z-index: 99999;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    animation: fadeIn 0.3s;
}
.toast-message.success, .alert-success {
    background: #e6f9ed;
    color: #198754;
    border: 1px solid #a6e9c5;
}
.toast-message.danger, .alert-danger {
    background: #fbeaea;
    color: #dc3545;
    border: 1px solid #f5c2c7;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
