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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    color: #1f2937;
}

.required {
    color: #ef4444;
    font-weight: bold;
}

.application-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f1f7 100%);
}

.header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    padding: 20px 40px;
    border-bottom: 3px solid #1d4ed8;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
}

.university-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.form-section {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.12);
    border: 1px solid #e2e8f0;
}

.form-title-container {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.faculty-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 15px 30px;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
}

.faculty-header p {
    color: #64748b;
    margin: 0;
    font-size: 14px;
    font-style: italic;
}

.application-form {
    padding: 0;
}

.form-group-container {
    margin-bottom: 0;
    border-bottom: 1px solid #e2e8f0;
}

.form-group-container:last-child {
    border-bottom: none;
}

.section-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 16px 30px;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.form-content {
    padding: 25px 30px;
}

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

.form-row:last-child {
    margin-bottom: 0;
}

.form-field {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-field.full-width {
    grid-column: 1 / -1;
    max-width: 600px;
}

.form-field label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    transition: all 0.3s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
    border-color: #9ca3af;
}

.form-field input.error,
.form-field select.error,
.form-field textarea.error {
    border-color: #ef4444;
}

.error-text {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-text.show {
    display: block;
}

.add-qualification-btn,
.add-experience-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.add-qualification-btn:hover,
.add-experience-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.qualification-item,
.experience-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #dc2626;
}

.experience-toggle {
    margin-bottom: 20px;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    background-color: #3b82f6;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.resume-section {
    margin: 20px 0;
    text-align: center;
}

.file-upload-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

#cvUpload {
    display: none;
}

.upload-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    color: #6b7280;
    padding: 12px 20px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.upload-container:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.browse-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.browse-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.upload-icon {
    font-size: 20px;
}

.upload-text {
    font-size: 14px;
}

.upload-note {
    color: #64748b;
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 0;
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.submit-section {
    text-align: center;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

#experienceSection.hidden {
    display: none;
}

.invalid {
  border: 1px solid red;
}
.error-message {
  color: red;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
    }

    .main-content {
        padding: 10px;
    }

    .form-content {
        padding: 20px 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-title {
        font-size: 22px;
    }

    .section-header {
        font-size: 16px;
        padding: 12px 20px;
    }

    .file-upload-container {
        flex-direction: column;
        gap: 10px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 15px;
    }

    .form-title {
        font-size: 20px;
    }

    .form-content {
        padding: 15px;
    }

    .submit-btn {
        padding: 14px 30px;
        font-size: 16px;
    }
}
