.otp-section {
    display: none;
}

.otp-section.active {
    display: block;
}

.otp-back-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin-bottom: 24px;
    transition: color 0.2s ease;
    direction: ltr;
    float: left;
}

.otp-back-btn:hover {
    color: var(--dark);
}

.otp-back-btn svg {
    width: 16px;
    height: 16px;
}

.otp-title {
    clear: both;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.otp-subtitle {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 32px;
    line-height: 1.5;
}

.otp-email-display {
    color: var(--primary);
    font-weight: 600;
}

.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.otp-input-container[dir="rtl"] {
    flex-direction: row-reverse;
}

.otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    background: var(--surface);
    color: var(--dark);
    transition: all 0.2s ease;
    caret-color: transparent;
}

.otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 149, 246, 0.15);
    outline: none;
}

.otp-digit.filled {
    border-color: var(--primary);
    background: rgba(0, 149, 246, 0.05);
}

.otp-digit.error {
    border-color: #dc3545;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.otp-resend-container {
    text-align: center;
    margin-top: 24px;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.otp-resend-btn:hover:not(:disabled) {
    background: rgba(0, 149, 246, 0.1);
}

.otp-resend-btn:disabled {
    color: var(--gray);
    cursor: not-allowed;
}

.otp-error-message {
    color: #dc3545;
    font-size: 14px;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    display: none;
}

.otp-error-message.visible {
    display: block;
}

.otp-verifying {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--gray);
    font-size: 14px;
    margin-top: 16px;
}

.otp-verifying.active {
    display: flex;
}

.otp-verifying.active + .otp-resend-container {
    display: none;
}


@media (max-width: 768px) {
    .otp-digit {
        width: 42px;
        height: 50px;
        font-size: 20px;
    }

    .otp-input-container {
        gap: 6px;
    }

    .otp-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 380px) {
    .otp-digit {
        width: 36px;
        height: 44px;
        font-size: 18px;
    }

    .otp-input-container {
        gap: 4px;
    }
}

