:root {
    --primary-color: #47C2F9;
    --primary-dark: #008CC0;
    --text-color: #333;
    --text-light: #666;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #eee;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition-base: all 0.3s ease;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --footer-height: 120px;
    --navbar-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--navbar-height);
}

.checkbox-label {
    margin-top: 1em;
    margin-bottom: 1em;
    cursor: pointer;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-signin {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-signin:hover {
    color: var(--primary-dark);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-container {
    min-height: calc(100vh - var(--navbar-height));
    /* min-height: 100vh; */
    display: flex;
    flex-direction: column;
    padding-bottom: var(--footer-height);
}

.main-content {
    flex: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 100px);
}

.form-content {
    margin-bottom: 40px;
}

.logo {
    text-align: center;
    /* margin-bottom: 2rem; */
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

h1 {
    font-size: 1.5rem;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.congrats-subtitle {
    color: var(--text-light);
    text-align: center;
    /* margin-bottom: 2rem; */
}

.subtitle {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2rem;
}

.congrats {
    margin-top: 4rem;
}

.options-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-card {
    cursor: pointer;
    position: relative;
}

.option-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    transition: var(--transition-base);
    background: var(--white);
}

.option-content i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.option-card:hover .option-content {
    border-color: var(--primary-color);
    background: var(--background-light);
}

.option-card input:checked + .option-content {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group.hidden {
    display: none;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input:not([type="checkbox"]) {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition-base);
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.additional-fields {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.additional-fields.visible {
    opacity: 1;
    max-height: none;
}

.image-upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.image-upload-container:hover {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.image-upload-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.image-preview {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: cover;
}

.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
}

.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.password-requirements p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
}

.password-requirements li {
    color: var(--text-light);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-requirements li::before {
    content: "•";
    color: var(--text-light);
}

.password-requirements li.valid {
    color: var(--success-color);
}

.password-requirements li.valid::before {
    content: "✓";
    color: var(--success-color);
}

.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    /* height: var(--footer-height); */
}

.footer-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem 20px;
}

.continue-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-base);
    opacity: 0.7;
    margin-bottom: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

.continue-btn:not(:disabled) {
    opacity: 1;
}

.continue-btn:not(:disabled):hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.continue-btn:not(:disabled):active {
    transform: translateY(0);
}

.continue-btn:disabled {
    cursor: not-allowed;
}

.continue-btn span {
    font-size: clamp(0.875rem, 2vw, 1rem);
    white-space: nowrap;
}

.login-link {
    text-align: center;
    color: var(--text-light);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}
/* Step 2: Password Input */
.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
}

/* Step 2: Password Requirements */
.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.password-requirements p {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
}

.password-requirements li {
    color: var(--text-light);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-requirements li::before {
    content: "•";
    color: var(--text-light);
}

.password-requirements li.valid {
    color: var(--success-color);
}

.password-requirements li.valid::before {
    content: "✓";
    color: var(--success-color);
}

/* Step 2: Phone Input */
.phone-input-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-code {
    padding: 0.75rem 1rem;
    background: var(--background-light);
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    min-width: 120px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.country-code:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.country-code option {
    padding: 0.5rem;
}

.input-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Step 3: Verification */
.verification-message {
    text-align: center;
    color: var(--success-color);
    margin-bottom: 2rem;
}

#verificationCode {
    text-align: center;
    letter-spacing: 0.5rem;
    font-size: 1.25rem;
}

#step4Content .input-hint {
    font-style: italic;
}

/* Step 4: T & C */
.agreement-text {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.agreement-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.agreement-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.agreement-text a:hover {
    text-decoration: underline;
}

.commitment-text {
    color: var(--text-light) !important;
    font-style: italic;
}

/* Fixed Footer */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.footer-content {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem 20px;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Back Button */
.back-btn {
    height: 100%;
    padding: 1rem;
    background: var(--background-light);
    color: var(--text-color);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-base);
    min-width: 100px;
}

.back-btn:hover {
    background: #e9ecef;
}

.back-btn.hidden {
    display: none;
}

/* Continue Button */
.continue-btn {
    flex: 1;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-base);
    opacity: 0.7;
    -webkit-appearance: none;
    appearance: none;
}

.continue-btn:not(:disabled) {
    opacity: 1;
}

.continue-btn:not(:disabled):hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.continue-btn:not(:disabled):active {
    transform: translateY(0);
}

.continue-btn:disabled {
    cursor: not-allowed;
}

.celebration-container {
    text-align: center;
    /* padding: 2rem 0; */
}


/* Toast Styles */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    animation: slideIn 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
}

.toast-close:hover {
    color: var(--text-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Login Link */
.login-link {
    text-align: center;
    color: var(--text-light);
}

.login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .main-content {
        padding: 20px 20px 120px;
    }

    .fixed-footer {
        background: var(--white);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }
}

/* iOS Safe Area Support */
@supports (-webkit-touch-callout: none) {
    .main-content {
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }
    
    .fixed-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .continue-btn span {
        font-size: clamp(0.75rem, 3vw, 0.875rem);
    }
}