@font-face {
    font-family: 'EuclidCircularA';
    src: url('https://g.lazcdn.com/g/lzd/assets/1.2.13/font/EuclidCircularA-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'EuclidCircularA';
    src: url('https://g.lazcdn.com/g/lzd/assets/1.2.13/font/EuclidCircularA-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'EuclidCircularA', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #212121;
    background: #f5f7fa;
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    background: #f5f7fa;
}

.page-banner {
    width: 100%;
    flex-shrink: 0;
    line-height: 0;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content {
    flex: 1;
    padding: 24px 22px 20px;
    background: #f5f7fa;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: #212121;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 14px;
    line-height: 1.55;
    color: #8c8c8c;
    margin-bottom: 22px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 16px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 18px;
}

.card-label {
    font-size: 15px;
    font-weight: 400;
    color: #424242;
    margin-bottom: 12px;
}

.phone-input-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 6px;
}

.phone-prefix {
    font-size: 16px;
    color: #212121;
    margin-right: 10px;
    flex-shrink: 0;
}

.phone-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: #212121;
    background: transparent;
    min-width: 0;
}

.phone-input::placeholder {
    color: #c2c2c2;
}

.phone-error {
    display: none;
    font-size: 13px;
    color: #e53935;
    margin-top: 8px;
}

.slider-container {
    position: relative;
    margin-bottom: 20px;
}

.slider-track {
    position: relative;
    height: 42px;
    background: #d4f3eb;
    border-radius: 6px;
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

.slider-track.disabled .slider-handle {
    background: linear-gradient(90deg, #a8e6d8, #8fd9c8);
    box-shadow: none;
    cursor: not-allowed;
}

.slider-track.disabled .slider-chevron {
    opacity: 0.7;
}

.slider-track.disabled {
    pointer-events: none;
}

.slider-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
    padding-left: 46px;
    color: #11c296;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(90deg, #17ca9d 0%, #17ca9d 40%, #fff 50%, #17ca9d 60%, #17ca9d 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: slideTextShimmer 3s infinite linear;
}

@keyframes slideTextShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.slider-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(90deg, #17ca9d, #02af83);
    border-radius: 6px;
    border: 0;
    cursor: grab;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px 0 rgba(0, 234, 175, 0.55);
    transition: box-shadow 0.2s;
}

.slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 1px 3px 0 rgba(0, 234, 175, 0.4);
}

.slider-chevron {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -5px;
}

.slider-loading .slider-handle {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.terms {
    font-size: 12px;
    line-height: 1.65;
    color: #a3a3a3;
    text-align: left;
}

.terms a {
    color: #1a71ff;
    text-decoration: none;
}

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

.page-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 22px 28px;
    flex-shrink: 0;
    background: #f5f7fa;
}

.footer-shield {
    width: 15px;
    height: 18px;
}

.footer-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #11c296;
    text-transform: uppercase;
}

/* OTP page */
.page-otp {
    background: #f5f7fa;
}

.page-otp .page-content {
    padding-top: 32px;
    text-align: center;
}

.otp-prompt {
    font-size: 16px;
    color: #212121;
    margin-bottom: 8px;
}

.otp-phone {
    font-size: 18px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}

.page-otp .card {
    text-align: left;
}

.otp-input-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.otp-boxes {
    display: flex;
    flex: 1;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 0;
}

.otp-digit {
    width: 28px;
    height: 36px;
    border: none;
    border-bottom: 2px solid #d0d0d0;
    border-radius: 0;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    font-family: inherit;
    color: #212121;
    outline: none;
    transition: border-color 0.2s;
    padding: 0 0 4px;
    background: transparent;
}

.otp-digit:focus {
    border-bottom-color: #17ca9d;
}

.otp-digit.filled {
    border-bottom-color: #17ca9d;
}

.otp-timer {
    flex-shrink: 0;
    min-width: 52px;
    height: 32px;
    padding: 0 10px;
    border: none;
    border-radius: 16px;
    background: #f0f0f0;
    color: #bdbdbd;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: default;
    transition: background 0.2s, color 0.2s;
}

.otp-timer.active {
    background: #f0f0f0;
    color: #bdbdbd;
}

.otp-timer.ready {
    background: #e8f8f4;
    color: #11c296;
    cursor: pointer;
}

.otp-timer.ready:hover {
    background: #d4f3eb;
}

.status-message {
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 16px;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.loading {
    background: transparent;
    padding: 20px 12px 8px;
}

.verify-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #d4f3eb;
    border-top-color: #17ca9d;
    border-radius: 50%;
    animation: verifySpin 0.8s linear infinite;
}

@keyframes verifySpin {
    to { transform: rotate(360deg); }
}

.status-message.error {
    background: #ffebee;
    color: #c62828;
}

.status-message.info {
    background: #e3f2fd;
    color: #1565c0;
}

.status-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Success page */
.page-success {
    background: #f5f7fa;
}

.page-success .page-content {
    padding-top: 24px;
    display: block;
}

.page-success .success-card {
    text-align: center;
    padding: 40px 24px 32px;
    margin-top: 10vh;
    margin-bottom: 0;
    width: 100%;
}

.success-title {
    font-size: 22px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 8px;
}

.success-phone {
    font-size: 16px;
    font-weight: 600;
    color: #212121;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(90deg, #17ca9d, #02af83);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(0, 234, 175, 0.35);
}

.success-icon svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.success-text {
    font-size: 14px;
    color: #8c8c8c;
    line-height: 1.6;
}

@media (min-width: 481px) {
    body {
        background: #eef1f6;
    }

    .page {
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
        margin-top: 0;
        margin-bottom: 0;
    }

    .page-title {
        font-size: 24px;
    }
}

@media (max-width: 360px) {
    .otp-boxes {
        gap: 6px;
    }

    .otp-digit {
        width: 24px;
        font-size: 18px;
    }

    .otp-timer {
        min-width: 46px;
        font-size: 13px;
    }
}
