/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #143345 0%, #2dbec6 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Video Section */
.video-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    margin-bottom: 2rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(20, 51, 69, 0.8) 0%, rgba(45, 190, 198, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-content {
    text-align: center;
    color: white;
    z-index: 2;
}

.video-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.video-content p {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.video-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.video-badge i {
    font-size: 1.2rem;
}

/* Form Section */
.form-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.form-header p {
    font-size: 1.1rem;
    color: #718096;
}

/* Form Section Cards */
.form-section-card {
    background: #f8fafc;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.form-section-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-header i {
    font-size: 1.5rem;
    color: #2dbec6;
    background: linear-gradient(135deg, #143345, #2dbec6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.optional-badge {
    background: linear-gradient(135deg, #143345, #2dbec6);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: auto;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

/* Three column layout for OTP row */
.form-row.three-columns {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Full width button */
.full-width-btn {
    width: 100%;
    padding: 0.875rem 1rem;
}

/* OTP Action Group Styling */
.otp-action-group {
    display: flex;
    flex-direction: column;
}

.otp-controls-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    min-width: 0;
}

/* OTP section styling */
#otpSection {
    display: none;
    gap: 0.5rem;
    align-items: center;
}

#otpSection.show {
    display: flex;
}

.otp-input-section {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
    flex-wrap: nowrap;
}

.otp-input-section input {
    width: 160px;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 0.2rem;
    font-weight: 600;
    min-width: 160px;
}

.otp-input-section .verify-btn {
    white-space: nowrap;
    padding: 0.875rem 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Form Controls */
label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

input, select, textarea {
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2dbec6;
    box-shadow: 0 0 0 3px rgba(45, 190, 198, 0.1);
    transform: translateY(-1px);
}

input:invalid {
    border-color: #e53e3e;
}

input:valid {
    border-color: #38a169;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-input i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.3s ease;
}

.password-input i:hover {
    color: #2dbec6;
}

/* OTP Section */
.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.otp-btn, .verify-btn {
    background: linear-gradient(135deg, #143345, #2dbec6);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.9rem;
    min-width: 140px;
    text-align: center;
    flex-shrink: 0;
}

.otp-btn:hover, .verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 190, 198, 0.4);
}

.otp-btn:disabled, .verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.otp-section {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.otp-section input {
    flex: 1;
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
}

/* Checkbox Styling */
.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #143345, #2dbec6);
    border-color: #2dbec6;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.link {
    color: #2dbec6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link:hover {
    text-decoration: underline;
    color: #143345;
    transform: translateY(-1px);
}

.link:visited {
    color: #2dbec6;
}

/* External link indicator */
.link[target="_blank"]::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 2px;
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.submit-btn {
    background: linear-gradient(135deg, #143345, #2dbec6);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 25px rgba(45, 190, 198, 0.3);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(45, 190, 198, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header i {
    font-size: 4rem;
    color: #2dbec6;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
}

.modal-body {
    padding: 1rem 2rem;
    text-align: center;
}

.modal-body p {
    color: #718096;
    font-size: 1.1rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.modal-btn {
    background: linear-gradient(135deg, #143345, #2dbec6);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 190, 198, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .video-section {
        height: 40vh;
        min-height: 300px;
        margin-bottom: 1rem;
    }
    
    .video-content h1 {
        font-size: 2.5rem;
    }
    
    .video-content p {
        font-size: 1.1rem;
    }
    
    .form-section {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .form-header h2 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row.three-columns {
        grid-template-columns: 1fr;
    }
    
    .otp-controls-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .otp-btn, .verify-btn {
        min-width: auto;
        width: 100%;
    }
    
    .otp-input-section {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .otp-input-section input {
        width: 100%;
        min-width: auto;
    }
    
    .form-section-card {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .optional-badge {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .otp-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .submit-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-body {
        padding: 1rem 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .video-content h1 {
        font-size: 2rem;
    }
    
    .video-content p {
        font-size: 1rem;
    }
    
    .form-header h2 {
        font-size: 1.8rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-section-card {
        padding: 1rem;
    }
    
    .section-header h3 {
        font-size: 1.3rem;
    }
    
    input, select, textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Error States */
.error {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1) !important;
}

.error-message {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.error-message i {
    font-size: 0.8rem;
}

/* Success States */
.success {
    border-color: #2dbec6 !important;
    box-shadow: 0 0 0 3px rgba(45, 190, 198, 0.1) !important;
}

.success-message {
    color: #2dbec6;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.success-message i {
    font-size: 0.8rem;
}
