@font-face {
    font-family: kalameh;
    src: url("./KalamehWeb-Medium.woff2");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: kalameh;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #0f0f1a;
    color: #e0e0f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* background blobs */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.blob1 {
    width: 500px;
    height: 500px;
    background: #7c3aed;
    top: -150px;
    right: -150px;
}

.blob2 {
    width: 400px;
    height: 400px;
    background: #5b21b6;
    bottom: -120px;
    left: -100px;
}

.blob3 {
    width: 300px;
    height: 300px;
    background: #a78bfa;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card {
    background: #16162a;
    border: 1px solid #2a2a45;
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

/* logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #c4b5fd;
}

/* steps indicator */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #2a2a45;
    color: #6b6b9a;
    background: #1e1e35;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.step-dot.active {
    border-color: #7c3aed;
    color: #c4b5fd;
    background: #2a1f5e;
}

.step-dot.done {
    border-color: #22c55e;
    color: #22c55e;
    background: #0f2e1a;
}

.step-line {
    width: 60px;
    height: 2px;
    background: #2a2a45;
    transition: background 0.4s;
}

.step-line.done {
    background: #22c55e;
}

/* screen switching */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: #e0e0f0;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    font-size: 13px;
    color: #6b6b9a;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.6;
}

.subtitle span {
    color: #c4b5fd;
}

/* label */
label {
    display: block;
    font-size: 13px;
    color: #a0a0c0;
    margin-bottom: 8px;
    font-weight: 500;
}

/* input */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b6b9a;
    font-size: 18px;
    pointer-events: none;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 14px 46px 14px 14px;
    background: #1e1e35;
    border: 1.5px solid #2a2a45;
    border-radius: 14px;
    color: #e0e0f0;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    letter-spacing: 1px;
    text-align: center;
}

input[type="text"]:focus,
input[type="tel"]:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

input::placeholder {
    color: #6b6b9a;
    letter-spacing: 0;
}

/* error */
.err-msg {
    font-size: 12px;
    color: #f87171;
    margin-top: -14px;
    margin-bottom: 16px;
    display: none;
    padding-right: 4px;
}

.err-msg.show {
    display: block;
}

/* OTP boxes */
.otp-wrap {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    direction: ltr;
}

.otp-input {
    width: 52px !important;
    height: 56px;
    padding: 0 !important;
    font-size: 22px !important;
    font-weight: 600;
    border-radius: 14px !important;
    text-align: center !important;
}

/* primary button */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    opacity: 0.92;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* loading spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* resend */
.resend-row {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #6b6b9a;
}

.resend-btn {
    background: none;
    border: none;
    color: #a78bfa;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
    display: none;
}

.resend-btn.show {
    display: inline;
}

#countdown {
    color: #c4b5fd;
    font-weight: 500;
}

.back-btn {
    background: none;
    border: none;
    color: #8b8bc0;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto 20px;
    padding: 4px 0;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #c4b5fd;
}

/* success screen */
.success-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #fff;
    margin: 0 auto 24px;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* slide animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.screen.active {
    animation: slideIn 0.3s ease;
}

/* terms */
.terms {
    font-size: 11px;
    color: #6b6b9a;
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}

.terms a {
    color: #a78bfa;
    text-decoration: none;
}

@media (max-width: 460px) {
    .card {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .otp-input {
        width: 44px !important;
        height: 50px;
        font-size: 20px !important;
    }
}