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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #000000;
    direction: rtl;
    text-align: right;
}

.step {
    display: none;
    min-height: 100vh;
}

.step.active {
    display: block;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

.logo {
    max-width: 300px;
    height: auto;
    margin-top: -50px;
}


.back-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.content {
    padding: 0 20px;
}

h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.3;
}

h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

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

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    background-color: white;
    text-align: right;
}

.input-group input:focus {
    outline: none;
    border-color: #000000;
}

.info-text {
    text-align: center;
    color: #666;
    margin: 30px 0;
    font-size: 14px;
    line-height: 1.4;
}

.continue-btn {
    width: 100%;
    padding: 15px;
    background-color: #000000;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: not-allowed;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

.continue-btn:hover {
    background-color: #000000;
}

.continue-btn.active-btn {
    background-color: #000000;
    color: #ffffff;
    cursor: pointer;
}

.continue-btn.active-btn:hover {
    background-color: #333333;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #f5f5f5;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    background-color: white;
    text-align: right;
}

.pin-description {
    color: #000000;
    font-size: 20px;
    line-height: 1.4;
    margin: 20px 0 30px 0;
}

.pin-circles {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    direction: ltr;
}

.circle {
    width: 50px;
    height: 50px;
    border: 2px solid #000000;
    border-radius: 50%;
    background-color: white;
}

.circle.filled {
    background-color: transparent; /* Убираем заливку */
    color: #000000; /* Цвет цифр */
}

.forgot-pin {
    color: #000000;
    font-size: 14px;
    margin-bottom: 30px;
    cursor: pointer;
}

.keypad {
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: ltr;
}

.keypad-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.key {
    width: 80px;
    height: 60px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.key span {
    font-size: 10px;
    color: #666;
    font-weight: normal;
}

.key:hover {
    background-color: #f0f0f0;
}

.key.delete {
    font-size: 20px;
}

/* SMS Code Styles */
.sms-content {
    text-align: center;
    padding-top: 60px;
}

.phone-display {
    font-size: 20px;
    color: #666;
    margin: 20px 0 40px 0;
}

.sms-circles {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
    direction: ltr;
}

.sms-circles .circle {
    width: 45px;
    height: 45px;
}

.sms-info {
    color: #666;
    font-size: 20px;
    line-height: 1.4;
    margin: 40px 0 30px 0;
}

.resend-info {
    color: #666;
    font-size: 20px;
    margin: 20px 0;
}

.phone-support {
    color: #000000;
    font-size: 14px;
    cursor: pointer;
    margin-top: 40px;
}

.sms-input-hidden {
    position: fixed;
    top: -100px;
    left: -100px;
    opacity: 0;
    height: 1px;
    width: 1px;
    border: none;
    background: transparent;
    pointer-events: none;
    z-index: -1000;
}

.error-message {
    text-align: center;
    color: #ff4444;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 20px;
    padding: 12px;
    background-color: #fff0f0;
    border-radius: 8px;
    border: 1px solid #ffcccc;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .content {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .input-group input {
        padding: 20px 15px;
        font-size: 16px;
    }
    
    .key {
        width: 95px;
        height: 80px;
        font-size: 20px;
    }
    
    .modal-content {
        width: 95%;
        padding: 25px 15px;
    }
    
    .pin-circles .circle{
        width: 65px;
        height: 65px;
        font-size: 50px;
    }

    .sms-circles .circle {
        width: 45px;
        height: 45px;
        font-size: 35px;
    }
}

@media (max-width: 360px) {
    .key {
        width: 60px;
        height: 50px;
        font-size: 18px;
    }
    
    .keypad-row {
        gap: 8px;
    }
    
    .pin-circles,
    .sms-circles {
        gap: 10px;
    }
}
