* {
    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-logo 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);
}

.university-info h1 {
    color: white;
    font-size: 32px;
    font-weight: bold;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.university-info h2 {
    color: #f1f5f9;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.university-info p {
    color: #cbd5e1;
    font-size: 12px;
    margin: 2px 0;
}

.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);
}

.quota-title {
    font-size: 24px;
    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;
}

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

.form-field.checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

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

.form-field input,
.form-field select {
    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 {
    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 {
    border-color: #9ca3af;
}

.form-field input:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.toggle-btn {
    padding: 8px 16px;
    border: 2px solid #d1d5db;
    background-color: white;
    color: #6b7280;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.toggle-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.toggle-btn:disabled {
    background-color: #f9fafb;
    color: #d1d5db;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.work-exp-toggle {
    margin-bottom: 20px;
}

.location-contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 25px 0;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.location-section h4,
.contact-section h4 {
    color: #1e40af;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 16px;
}

.exam-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 25px 0;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.exam-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.exam-label {
    font-weight: bold;
    color: #1e40af;
    font-size: 16px;
    text-align: center;
}

.year-input {
    padding: 8px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
}

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

.year-input:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    border-color: #e5e7eb;
}

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

.file-upload-container {
    position: relative;
    display: inline-block;
}

#resumeUpload {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
}

.upload-container: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;
}

.confirmation-section {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #3b82f6;
    border-radius: 4px;
}

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

.submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

/* Qualification Item Styles */
.qualification-item {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8fafc;
    position: relative;
}

.qualification-item:last-child {
    margin-bottom: 0;
}

.remove-btn-container {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.remove-qualification-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.remove-qualification-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.add-qualification-section {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #d1d5db;
}

.add-qualification-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

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

/* Experience Item Styles */
.remove-btn-container {
     display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.remove-experience-btn {
      background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.remove-experience-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
 

/* Research Paper Item Styles */
.research-paper-item {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8fafc;
    position: relative;
}

.research-paper-item:last-child {
    margin-bottom: 0;
}

.remove-research-paper-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.remove-research-paper-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.add-research-paper-section {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px dashed #d1d5db;
}

.add-research-paper-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

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

/* Error message styles for research papers */
.research-paper-item .error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}

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

    .university-info h1 {
        font-size: 24px;
    }

    .university-info h2 {
        font-size: 20px;
    }

    .main-content {
        padding: 10px;
    }

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

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

    .location-contact-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .form-title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .button-group {
        flex-wrap: wrap;
    }
}

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

    .university-info h1 {
        font-size: 20px;
    }

    .university-info h2 {
        font-size: 16px;
    }

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

    .quota-title {
        font-size: 18px;
    }

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

    .form-content {
        padding: 15px;
    }

    .button-group {
        flex-direction: column;
        gap: 8px;
    }

    .toggle-btn {
        padding: 10px 16px;
    }

    .exam-group {
        padding: 12px;
    }

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

#experienceFields {
    display: block;
}

#experienceFields.hidden {
    display: none;
}
