/* Student Registration Form Styles */

/* Form Container */
.registration-form {
    background: #ffffff;
    border-radius: 25px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.08), 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.form-container {
    padding: 4rem 3rem;
    position: relative;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff0000 0%, #424242 50%, #ff0000 100%);
    border-radius: 25px 25px 0 0;
}

/* Form Header */
.form-header {
    margin-bottom: 4rem;
    position: relative;
    padding: 2rem 0;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #ff0000 0%, #424242 100%);
    border-radius: 2px;
}

.form-header h1 {
    background: linear-gradient(135deg, #ff0000 0%, #424242 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    position: relative;
    margin-bottom: 1rem;
}

.form-header h1::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(66, 66, 66, 0.1) 100%);
    border-radius: 50%;
    z-index: -1;
}

/* Header Badges */
.header-badge .badge {
    background: linear-gradient(135deg, #ff0000 0%, #424242 100%) !important;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.security-badges .badge {
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.security-badges .badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.form-header .alert {
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 133, 133, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
    color: #424242;
    font-weight: 500;
    border-left: 4px solid #ff0000;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Form Sections */
.form-section {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 20px;
    border-left: 6px solid #ff0000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.02) 0%, rgba(66, 66, 66, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.form-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
    border-left-color: #e60000;
}

.form-section:hover::before {
    opacity: 1;
}

.section-title {
    color: #424242;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid transparent;
    background: linear-gradient(90deg, #ff0000 0%, rgb(255, 133, 133) 50%, #ff0000 100%) bottom/100% 3px no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}

.section-title i {
    color: #ff0000;
    margin-right: 0.8rem;
    font-size: 1.2em;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(66, 66, 66, 0.1) 100%);
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid rgba(233, 236, 239, 0.8);
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    position: relative;
}

.form-control:focus, .form-select:focus {
    border-color: #ff0000;
    box-shadow: 0 0 0 0.3rem rgba(255, 0, 0, 0.15), 0 8px 25px rgba(255, 0, 0, 0.1);
    background: #ffffff;
    transform: translateY(-2px);
}

.form-control:hover, .form-select:hover {
    border-color: rgba(255, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* Course Select Styling */
.form-select optgroup {
    font-weight: 700;
    color: #ff0000;
    background: rgba(255, 0, 0, 0.05);
    padding: 0.5rem 0;
    margin: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}

.form-select option {
    padding: 0.8rem 1rem;
    font-size: 14px;
    color: #424242;
    background: #ffffff;
    transition: all 0.2s ease;
}

.form-select option:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff0000;
}

.form-select option:checked {
    background: #ff0000;
    color: #ffffff;
    font-weight: 600;
}

.form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Form Labels */
.form-label {
    font-weight: 700;
    color: #424242;
    margin-bottom: 0.8rem;
    font-size: 15px;
    letter-spacing: 0.3px;
    position: relative;
    display: inline-block;
}

.form-label::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff0000 0%, #424242 100%);
    transition: width 0.3s ease;
}

.form-control:focus + .form-label::after,
.form-select:focus + .form-label::after {
    width: 100%;
}

.form-label .text-danger {
    font-weight: bold;
}

/* File Input Styling */
.form-control[type="file"] {
    padding: 8px 15px;
    cursor: pointer;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, #ff0000 0%, #424242 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

/* Form Text */
.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 0.25rem;
}

.form-text i {
    color: #ff0000;
}

/* Checkbox Styling */
.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-top: 0.1rem;
}

.form-check-input:checked {
    background-color: #ff0000;
    border-color: #ff0000;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 0, 0, 0.25);
}

.form-check-label {
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.form-check-label a {
    color: #ff0000;
    text-decoration: none;
    font-weight: 500;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 30px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #ff0000 0%, #424242 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 0, 0, 0.4), 0 8px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #e60000 0%, #333333 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #424242 0%, #000000 100%);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(66, 66, 66, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(66, 66, 66, 0.4);
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
}

.btn-lg {
    padding: 18px 45px;
    font-size: 16px;
}

/* Submit Section */
.submit-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid rgba(255, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.submit-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff0000 0%, #424242 50%, #ff0000 100%);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.submit-section .form-check {
    background: #ffffff;
    padding: 1rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 0, 0, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.submit-section .form-check-label {
    font-weight: 600;
    color: #424242;
    font-size: 14px;
}

/* Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Validation States */
.form-control.is-valid, .form-select.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.44-1.44L6.7 1.3l.94.94L4.68 5.2l-.94.94-.94-.94z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #28a745;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-section {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title::before {
        left: -1.5rem;
    }
    
    .section-title i {
        width: 2rem;
        height: 2rem;
        font-size: 1em;
    }
    
    .btn-lg {
        padding: 15px 30px;
        font-size: 14px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0;
    }
    
    .submit-section {
        padding: 1.5rem;
    }
    
    .security-badges .badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 576px) {
    .form-container {
        padding: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-header {
        margin-bottom: 2rem;
    }
    
    .form-header h1 {
        font-size: 1.75rem;
    }
}

/* Animation for form sections */
.form-section {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for form sections */
.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }

/* File upload preview */
.file-preview {
    margin-top: 10px;
    padding: 10px;
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    text-align: center;
    background: #f8f9fa;
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-preview .file-name {
    font-size: 12px;
    color: #6c757d;
    word-break: break-all;
}

/* Success message styling */
.success-message {
    background: linear-gradient(135deg, rgb(255, 133, 133) 0%, #ffffff 100%);
    border: 1px solid rgb(255, 133, 133);
    color: #424242;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.success-message i {
    color: #ff0000;
    margin-right: 0.5rem;
}

/* Error message styling */
.error-message {
    background: linear-gradient(135deg, rgb(255, 133, 133) 0%, #ffffff 100%);
    border: 1px solid rgb(255, 133, 133);
    color: #424242;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.error-message i {
    color: #ff0000;
    margin-right: 0.5rem;
}

/* Progress indicator */
.progress-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e9ecef;
    z-index: 9999;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #ff0000 0%, #424242 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* Custom scrollbar */
.form-container::-webkit-scrollbar {
    width: 8px;
}

.form-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.form-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff0000 0%, #424242 100%);
    border-radius: 4px;
}

.form-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e60000 0%, #333333 100%);
}
