/*================================================
  REGISTER FORM - DEFINITIVE (LIQUID GLASS PERFECTED)
================================================*/

/* 1. THEME: LIQUID GLASS PALETTE & HIGH CONTRAST
-------------------------------------------------*/
:root {
    --primary-color: #E55D6C;
    --dark-bg: #121019;
    --glass-bg: rgba(35, 33, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-on-dark: #FFFFFF;
    --text-placeholder: #b0aec2;
    --input-bg: #211F2E;
    --input-border: #4a4a6a;
    --input-focus-glow: 0 0 0 4px rgba(229, 93, 108, 0.3);
    --input-focus-border: #E55D6C;
    --font-sans: 'Poppins', sans-serif;
    --font-serif: 'Playfair Display', serif;
}
body { font-family: var(--font-sans); background-color: var(--dark-bg); color: var(--text-on-dark); cursor: none; overflow-x: hidden; }
*:focus-visible { outline: none; }
a, button, input, select { cursor: none; }

/* 2. VISUALS: BACKGROUND & CURSOR
-------------------------------------------------*/
.background-container, #cursor-trail-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.background-container { filter: blur(100px); }
#cursor-trail-container { z-index: 9999; }
@keyframes move-orb { 0% { transform: translate(0, 0) } 25% { transform: translate(40vw, 50vh) } 50% { transform: translate(20vw, -30vh) } 75% { transform: translate(-30vw, 40vh) } 100% { transform: translate(0, 0) } }
.orb { position: absolute; border-radius: 50% }
.orb-1 { top: 10%; left: 10%; width: 300px; height: 300px; background: #DA4453; animation: move-orb 30s infinite alternate }
.orb-2 { top: 60%; left: 40%; width: 400px; height: 400px; background: #89216B; animation: move-orb 35s infinite alternate-reverse }
.orb-3 { top: 20%; left: 70%; width: 350px; height: 350px; background: #3a6186; animation: move-orb 25s infinite alternate }
.cursor-dot { 
    width: 10px; 
    height: 10px; 
    background-color: var(--primary-color); 
    border-radius: 50%; 
    position: absolute; 
    transform: translate3d(-50%, -50%, 0); 
    transition: transform 0.08s linear; 
    box-shadow: 0 0 10px var(--primary-color) 
}
.cursor-dot.hover { transform: translate3d(-50%, -50%, 0) scale(1.8) }
.heart-particle { position: absolute; pointer-events: none; opacity: 1; animation: fall-and-fade 2.5s ease-in forwards }
.heart-particle::before { content: '❤'; font-size: 24px; color: var(--primary-color); text-shadow: 0 0 5px var(--primary-color) }
@keyframes fall-and-fade { 0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1 } 100% { transform: translateY(150px) scale(0) rotate(90deg); opacity: 0 } }

/* 3. LAYOUT & LIQUID GLASS FORM
-------------------------------------------------*/
.register-wrapper { min-height: 100vh; padding: 60px 1rem; display: flex; align-items: center; justify-content: center; }
.register-container { max-width: 900px; width: 100%; }
.form-container { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 3rem; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); }

/* 4. PROFESSIONAL PROGRESS BAR
-------------------------------------------------*/
.progress-navbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; position: relative; }
.progress-line { position: absolute; top: 25px; left: 15%; right: 15%; height: 2px; background-color: var(--glass-border); z-index: 1; }
.progress-bar-custom { position: absolute; top: 25px; left: 15%; height: 2px; width: 0; background-color: var(--primary-color); z-index: 2; transition: width 0.5s ease-in-out; }
.step-marker { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; width: 30%; color: #aaa; transition: color 0.4s ease; }
.step-icon { width: 50px; height: 50px; border-radius: 50%; background-color: transparent; border: 2px solid var(--glass-border); color: #aaa; display: grid; place-items: center; font-size: 1.5rem; transition: all 0.4s ease; }
.step-marker span { margin-top: 0.75rem; font-weight: 500; }
.step-marker.active { color: var(--text-on-dark); }
.step-marker.active .step-icon { border-color: var(--primary-color); color: var(--primary-color); }
.step-marker.completed { color: var(--text-on-dark); }
.step-marker.completed .step-icon { background-color: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.step-marker.completed .step-icon::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }

/* 5. PERFECTED HIGH-VISIBILITY INPUTS
-------------------------------------------------*/
.form-header h2 { font-family: var(--font-serif); font-size: 2.25rem; }
.form-header p { opacity: 0.7; }
.form-label { font-weight: 500; margin-bottom: 0.5rem; }
.form-group { position: relative; }
.form-control, .form-select { height: 52px; background-color: var(--input-bg); border: 1px solid var(--input-border); border-radius: 12px; padding: 0 1rem; color: var(--text-on-dark); transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form-control::placeholder { color: var(--text-placeholder); }
select.form-select option { background: #302E42; color: #FFFFFF; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--input-focus-border); box-shadow: var(--input-focus-glow); }
.form-step { display: none }
.form-step.active { display: block; animation: step-fade-in .5s forwards }
@keyframes step-fade-in { from { opacity: 0 } to { opacity: 1 } }

/* 6. CUSTOM FILE INPUT & CHECKBOX
-------------------------------------------------*/
.file-input-wrapper { position: relative; height: 52px; }
.file-input-hidden { display: none; }
.file-input-label { display: flex; align-items: center; width: 100%; height: 100%; background-color: var(--input-bg); border: 1px solid var(--input-border); border-radius: 12px; padding: 0 1rem; color: var(--text-placeholder); transition: all 0.3s ease; }
.file-input-wrapper:focus-within .file-input-label { border-color: var(--input-focus-border); box-shadow: var(--input-focus-glow); }
.file-input-icon { margin-right: 0.75rem; font-size: 1.1rem; color: var(--primary-color); }
.file-input-text.has-file { color: var(--text-on-dark); }
.custom-checkbox a { color: var(--primary-color); text-decoration: none; }

/* 7. NAVIGATION BUTTONS
-------------------------------------------------*/
.form-navigation { padding-top: 1.5rem; margin-top: 2rem; border-top: 1px solid var(--glass-border) }
.btn-nav { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 2rem; font-size: 1rem; font-weight: 600; border-radius: 50px; border: none; cursor: none; text-decoration: none; transition: all .3s ease }
.btn-prev { background-color: rgba(255, 255, 255, .1); color: var(--text-on-dark) }
.btn-prev:hover { background-color: rgba(255, 255, 255, .2) }
.btn-next, .btn-submit { background: var(--primary-color); color: #fff; box-shadow: 0 4px 15px rgba(229, 93, 108, .3) }
.btn-next:hover, .btn-submit:hover { transform: translateY(-px); box-shadow: 0 8px 20px rgba(229, 93, 108, .4) }

/* 8. SUCCESS MESSAGE STYLES
-------------------------------------------------*/
.success-container { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.success-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 3rem; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); text-align: center; max-width: 600px; animation: step-fade-in 0.6s forwards; }
.success-icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 1.5rem; }
.success-title { font-family: var(--font-serif); font-size: 2.25rem; color: #fff; margin-bottom: 1rem; }
.success-message { color: var(--text-placeholder); font-size: 1.1rem; line-height: 1.6; }
.contact-info { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--glass-border); }
.contact-info p { margin-bottom: 1.5rem; color: var(--text-on-dark); }
.contact-buttons { display: flex; justify-content: center; gap: 1rem; }
.btn-contact { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; }
.btn-contact.whatsapp { background-color: #25D366; color: #fff; }
.btn-contact.phone { background-color: #34B7F1; color: #fff; }
.btn-contact:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.back-to-home { display: inline-block; margin-top: 2.5rem; color: var(--primary-color); text-decoration: none; font-weight: 500; }

/* 9. REAL-TIME VALIDATION & VIEW PASSWORD STYLES
-------------------------------------------------*/
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--primary-color) !important; }
.form-control.is-invalid { 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='%23E55D6C'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23E55D6C' stroke='none'/%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); }
.password-toggle-icon ~ .form-control.is-invalid { background-position: right calc(2.375em + 0.1875rem) center; }
.invalid-feedback { display: none; width: 100%; margin-top: .5rem; font-size: .875em; font-weight: 500; color: var(--primary-color); animation: step-fade-in 0.3s forwards; }
.is-invalid ~ .invalid-feedback { display: block; }
.password-toggle-icon { position: absolute; top: 45px; right: 1rem; color: var(--text-placeholder); transition: color 0.3s ease; z-index: 10; }
.password-toggle-icon:hover { color: var(--primary-color); }
.image-preview-container { max-width: 200px; margin-left: auto; margin-right: auto; }
#imagePreview { width: 100%; height: auto; border-radius: 8px; border: 3px solid #e0e0e0; padding: 4px; background-color: #f8f9fa; }
.image-preview-hidden { display: none; }

/* 10. [REVISED] CUSTOM RADIO, CHECKBOX, & CASTE STYLES
-------------------------------------------------*/
/* Hide default browser inputs */
.form-check-input,
.custom-checkbox input[type="checkbox"] {
    display: none;
}
/* Style the labels for alignment and spacing */
.form-check-label,
.custom-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-on-dark);
}
/* Create the custom control element */
.form-check-label::before,
.custom-checkbox label::before {
    content: '';
    flex-shrink: 0;
    display: inline-block;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    transition: all 0.2s ease;
}
/* Style for RADIO buttons (Yes/No) */
.form-check-label::before {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.form-check-input:checked + .form-check-label::before {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    /* Creates the inner dot */
    background-image: radial-gradient(circle, white 40%, transparent 45%);
}
/* Style for CHECKBOXES */
.custom-checkbox label::before {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}
.custom-checkbox input[type="checkbox"]:checked + label::before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    text-align: center;
    line-height: 16px;
    font-size: 11px;
}
.custom-checkbox input[type="checkbox"]:checked + label {
    color: var(--primary-color);
    font-weight: 500;
}
/* Caste preference box styling */
.caste-selection-box {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
}
.caste-master-control { padding: 0.5rem 0; }
.caste-master-control .custom-checkbox label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-on-dark);
}
.caste-master-control .custom-checkbox label:hover { color: var(--primary-color); }
.caste-divider {
    border: none;
    height: 1px;
    background-color: var(--input-border);
    margin: 0.75rem 0;
}
.caste-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem 1.5rem;
}
.caste-item.custom-checkbox label {
    font-size: 0.9rem;
    color: var(--text-placeholder);
    font-weight: 400;
    width: 100%;
    transition: color 0.2s ease;
}

/* 11. RESPONSIVE DESIGN
-------------------------------------------------*/
@media (max-width: 992px) {
    .form-container { padding: 2rem; }
}
@media (max-width: 768px) {
    .register-wrapper { padding: 40px 1rem; }
    .form-header h2, .success-title { font-size: 2rem; }
    .progress-line, .progress-bar-custom { left: 10%; right: 10%; top: 22px; }
    .step-marker span { font-size: 0.875rem; }
    .step-icon { width: 45px; height: 45px; font-size: 1.25rem; }
    .contact-buttons { flex-direction: column; gap: 0.75rem; }
    .btn-contact { width: 100%; justify-content: center; }
}
@media (max-width: 576px) {
    body, a, button, input, select { cursor: default; }
    #cursor-trail-container { display: none; }
    .register-wrapper { padding: 20px 1rem; }
    .form-container, .success-card { padding: 1.5rem; }
    .form-header h2, .success-title { font-size: 1.75rem; }
    .progress-navbar { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
    .progress-line, .progress-bar-custom { display: none; }
    .step-marker { flex-direction: row; width: 100%; align-items: center; }
    .step-icon { margin-right: 1rem; }
    .step-marker span { margin-top: 0; }
    .form-navigation { display: flex; flex-direction: column-reverse; gap: 1rem; }
    .btn-nav { width: 100%; justify-content: center; }
    .success-message { font-size: 1rem; }
    .caste-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 12. [NEW] PASSWORD STRENGTH METER
-------------------------------------------------*/
.password-strength-meter {
    height: 6px;
    background-color: var(--input-bg);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}
#password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background-color: transparent;
    transition: width 0.3s ease, background-color 0.3s ease;
}
#password-strength-text {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: right;
    color: var(--text-placeholder);
    height: 1.2em; /* Reserve space to prevent layout shift */
    transition: color 0.3s ease;
}

/* Strength Colors */
.strength-weak { background-color: #dc3545; }
.strength-medium { background-color: #ffc107; }
.strength-strong { background-color: #198754; }