/* Enhanced CSS */
body {
    background-color: #f0f2f5;
    color: #343a40;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    transition: all 0.3s ease;
}

.header-section {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2.5rem;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.header-section h1 {
    font-weight: 800;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.header-section .lead {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 70%;
    margin: 0 auto;
}

.form-container {
    background-color: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    margin-bottom: 2.5rem;
    transition: all 0.4s ease;
    position: relative;
}

.form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.1);
}

.section-title {
    border-left: 6px solid #6a11cb;
    padding-left: 1.2rem;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
    color: #32325d;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 1.2rem;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    border-radius: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border: none;
    padding: 0.9rem 3rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 50px;
    box-shadow: 0 7px 15px rgba(37, 117, 252, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a0cb0 0%, #1e68e5 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 117, 252, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(37, 117, 252, 0.4);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.btn-primary:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.test-images {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    border: 3px solid transparent;
}

.test-images:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 3px solid rgba(106, 17, 203, 0.3);
}

.test-card {
    background-color: #f8f9fa;
    border-radius: 1.2rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
}

.test-card:hover {
    border-color: rgba(106, 17, 203, 0.3);
    background-color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.test-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.test-icon {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.2rem;
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.3);
    transition: all 0.3s ease;
}

.test-card:hover .test-icon {
    transform: scale(1.1) rotate(10deg);
}

.hand-icon {
    display: inline-block;
    margin-right: 0.7rem;
    color: #6a11cb;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.form-check:hover .hand-icon {
    transform: translateX(3px);
}

.required-asterisk {
    color: #ff4757;
    font-weight: bold;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.2);
    border-color: #6a11cb;
}

.form-check-input {
    width: 1.3rem;
    height: 1.3rem;
    margin-top: 0.2rem;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #6a11cb;
    border-color: #6a11cb;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(106, 17, 203, 0.2);
}

.form-check-label {
    padding-left: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check:hover .form-check-label {
    color: #6a11cb;
}

.form-check {
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
}

.form-check:hover {
    background-color: rgba(106, 17, 203, 0.05);
}

.ethnicity-select {
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
}

footer {
    background: linear-gradient(135deg, #32325d 0%, #1a1f36 100%);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-radius: 1.5rem 1.5rem 0 0;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
}

footer p {
    margin-bottom: 0;
    font-weight: 500;
}

.success-container {
    text-align: center;
    padding: 3rem 0;
}

.success-icon {
    font-size: 5rem;
    color: #2ecc71;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.progress-container {
    width: 100%;
    height: 10px;
    background: #f0f2f5;
    border-radius: 5px;
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    width: 0;
    border-radius: 5px;
    transition: width 0.4s ease;
}

/* Form group hover effect */
.form-group {
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group:hover {
    background-color: rgba(106, 17, 203, 0.03);
}

.form-group label {
    font-weight: 600;
    color: #32325d;
    margin-bottom: 0.5rem;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .header-section {
        padding: 2rem 0;
        border-radius: 0 0 1.5rem 1.5rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .header-section h1 {
        font-size: 2.2rem;
    }
    
    .header-section .lead {
        font-size: 1.1rem;
        max-width: 90%;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .test-card {
        padding: 1.5rem;
    }
    
    .test-icon {
        width: 40px;
        height: 40px;
    }
}

/* Floating labels and animations */
.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-label input {
    padding: 1.2rem 1rem 0.5rem;
    height: 60px;
}

.floating-label label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem 1rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity .15s ease-in-out, transform .15s ease-in-out;
    color: #6c757d;
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label {
    transform: scale(.8) translateY(-0.5rem) translateX(0.15rem);
    color: #6a11cb;
}



/* Animated background for header */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.animated-bg-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.shape1 {
    width: 600px;
    height: 600px;
    left: -300px;
    top: -300px;
}

.shape2 {
    width: 400px;
    height: 400px;
    right: -200px;
    top: -100px;
}

.shape3 {
    width: 300px;
    height: 300px;
    right: 30%;
    bottom: -150px;
}

/* Checkbox animated checkmark */
.checkmark-animation {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #6c757d;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.test-checkbox {
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    display: block;
    margin-bottom: 12px;
}

.test-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.test-checkbox input:checked ~ .checkmark-animation {
    background-color: #6a11cb;
    border-color: #6a11cb;
}

.checkmark-animation:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.test-checkbox input:checked ~ .checkmark-animation:after {
    display: block;
    animation: checkmark 0.3s ease-in-out;
}

@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 0;
    }
    40% {
        height: 0;
        width: 5px;
        opacity: 1;
    }
    100% {
        height: 10px;
        width: 5px;
        opacity: 1;
    }
}
