* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f2f2f7;
    color: #1d1d1f;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 600px;
}

.auth-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.auth-header {
    margin-bottom: 20px;
}

.auth-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.auth-icon svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1d1d1f;
}

.auth-subtitle {
    font-size: 15px;
    color: #8e8e93;
    margin-bottom: 20px;
    line-height: 1.4;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.step-indicator:before {
    content: '';
    position: absolute;
    top: 12px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e5e5ea;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #e5e5ea;
    color: #8e8e93;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    font-weight: 600;
    font-size: 13px;
}

.step.active .step-number {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
}

.step-label {
    font-size: 11px;
    color: #8e8e93;
}

.step.active .step-label {
    color: #1d1d1f;
    font-weight: 500;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e5e5ea;
    border-radius: 10px;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-input::placeholder {
    color: #c7c7cc;
}

.form-note {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 4px;
}

.security-notice {
    background: #f0f7ff;
    border-left: 4px solid #007AFF;
    padding: 10px 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-size: 13px;
    text-align: left;
    color: #1d1d1f;
}

.security-notice strong {
    color: #007AFF;
}

.auth-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.auth-button:hover {
    background: linear-gradient(135deg, #0056CC, #4745C5);
}

.cancel-button {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #007AFF;
    border: 2px solid #e5e5ea;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

.cancel-button:hover {
    background: #f8f8f8;
    border-color: #007AFF;
}

.error-message {
    background: #ff3b30;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: left;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.toggle-password:hover {
    color: #007AFF;
}

/* Стили для шага 2 (Google Auth) */
.qr-container {
    background: #f8f8f8;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
}

.qr-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d1d1f;
    text-align: center;
}

.qr-code-container {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.qr-code {
    flex-shrink: 0;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qr-code img {
    width: 120px;
    height: 120px;
    border-radius: 5px;
}

.qr-instruction {
    font-size: 13px;
    color: #8e8e93;
    line-height: 1.5;
    text-align: left;
    flex-grow: 1;
}

.qr-instruction ol {
    margin-left: 18px;
    margin-top: 5px;
}

.qr-instruction li {
    margin-bottom: 4px;
}

.manual-setup-container {
    margin-top: 15px;
    border-top: 1px solid #e5e5ea;
    padding-top: 15px;
}

.setup-toggle {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #e5e5ea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.setup-toggle:hover {
    background: #f8f8f8;
    border-color: #007AFF;
}

.setup-toggle.active {
    background: #f0f7ff;
    border-color: #007AFF;
}

.setup-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #ffffff;
    border-radius: 10px;
    padding: 0 15px;
}

.setup-content.expanded {
    max-height: 500px;
    padding: 15px;
    border: 2px solid #e5e5ea;
    margin-bottom: 15px;
}

.secret-display {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px;
}

.secret-key {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 1px;
    color: #1d1d1f;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    word-break: break-all;
    border: 1px solid #e5e5ea;
}

.copy-btn {
    width: 100%;
    padding: 10px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.copy-btn:hover {
    background: #0056CC;
}

.copy-btn.success {
    background: #34C759;
}

.code-input-container {
    margin-bottom: 15px;
    position: relative;
}

.code-input-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.code-digit {
    width: 42px;
    height: 50px;
    font-size: 22px;
    text-align: center;
    border: 2px solid #e5e5ea;
    border-radius: 8px;
    background: #ffffff;
    color: #1d1d1f;
    font-weight: 600;
    transition: all 0.2s;
}

.code-digit:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.digit-active {
    border-color: #007AFF;
    background: #f0f7ff;
}

.timer-display {
    font-size: 13px;
    color: #8e8e93;
    margin-bottom: 15px;
}

.timer {
    font-weight: 600;
    color: #007AFF;
}

.help-link {
    display: block;
    margin-top: 15px;
    color: #007AFF;
    text-decoration: none;
    font-size: 13px;
}

.help-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 20px 15px;
        border-radius: 16px;
    }
    
    .auth-title {
        font-size: 18px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .form-input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .qr-code-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .qr-instruction {
        text-align: center;
    }
    
    .qr-code {
        margin-bottom: 10px;
    }
    
    .qr-code img {
        width: 150px;
        height: 150px;
    }
    
    .code-digit {
        width: 38px;
        height: 46px;
        font-size: 20px;
    }
}