/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFE066;
    --primary-hover: #FFD54F;
    --success-color: #FFE066;
    --error-color: #ef4444;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --input-bg: #f9fafb;
    --white: #ffffff;
    --black: #000000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: transparent;
    min-height: 100vh;
    padding: 20px 15px;
    color: var(--text-color);
    line-height: 1.5;
}

/* ===== Container ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Form Wrapper ===== */
.form-wrapper {
    background: transparent;
    padding: 0;
}

/* ===== Form Layout ===== */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
    min-width: 0;
}

.form-group.full-width {
    flex: 1 1 100%;
}


/* ===== Labels ===== */
label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 6px;
}

.required {
    color: var(--error-color);
    margin-left: 2px;
}

/* ===== Inputs ===== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
}

input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
    min-height: 180px;
}

/* ===== Email + OTP Wrapper ===== */
.email-otp-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.email-otp-wrapper input {
    flex: 1;
}

.btn-send-otp {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-send-otp:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-send-otp:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* ===== OTP Verification ===== */
.otp-verification-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.otp-verification-wrapper input {
    flex: 1;
    max-width: 200px;
}

.btn-verify-otp {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    background: var(--success-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-verify-otp:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-verify-otp:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.verification-status {
    font-size: 14px;
    font-weight: 500;
    margin-left: 10px;
}

.verification-status.verified {
    color: var(--black);
    font-weight: 600;
}

.verification-status.error {
    color: var(--error-color);
}

.otp-timer {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Checkboxes ===== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    user-select: none;
}

/* ===== Buttons ===== */
.btn-submit {
    width: auto;
    max-width: 300px;
    padding: 12px 50px;
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px auto 0;
    display: block;
    transition: all 0.2s;
    position: relative;
}

.btn-submit:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-submit:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.btn-submit.loading .btn-text {
    visibility: hidden;
}

.btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: var(--black);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn-submit.loading .btn-loader {
    display: block;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.btn-secondary {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--black);
}

/* ===== Error Message ===== */
.error-message {
    display: none;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: var(--error-color);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ===== Success Message ===== */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    margin-bottom: 20px;
    animation: scaleIn 0.4s ease-in-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 12px;
}

.success-message p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ===== Responsive Design ===== */
@media (max-width: 480px) {
    body {
        padding: 20px 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .email-otp-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-send-otp {
        width: 100%;
    }

    .otp-verification-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .otp-verification-wrapper input {
        max-width: 100%;
    }

    .btn-verify-otp {
        width: 100%;
    }

    .verification-status {
        margin-left: 0;
        margin-top: 10px;
    }

    .form-header h1 {
        font-size: 24px;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

input:focus-visible,
button:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
