/* Reset и базовые стили */
.swauth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 20px;
}

.swauth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swauth-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid #e4e6eb;
}

.swauth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(135deg, #1877F2, #42B72A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.swauth-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: #1c1e21;
}

.subtitle {
    margin: 0;
    font-size: 14px;
    color: #65676b;
}

.swauth-body {
    padding: 24px 32px 32px;
}

.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #1c1e21;
}

.form-group input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

.input-icon {
    position: absolute;
    right: 12px;
    bottom: 12px;
    font-size: 20px;
    opacity: 0.6;
}

.swauth-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.swauth-btn-primary {
    background: #1877f2;
    color: white;
}

.swauth-btn-primary:hover {
    background: #166fe5;
}

.swauth-btn-primary:active {
    transform: scale(0.98);
}

.swauth-btn-danger {
    background: #e41e3f;
    color: white;
    margin-bottom: 12px;
}

.swauth-btn-danger:hover {
    background: #c01a38;
}

.swauth-link {
    background: none;
    border: none;
    color: #1877f2;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.swauth-link:hover {
    text-decoration: underline;
}

.resend-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e4e6eb;
}

.timer {
    font-size: 14px;
    color: #65676b;
    font-family: monospace;
}

.auth-message {
    margin-top: 16px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.auth-message.error {
    display: block;
    background: #fde7e9;
    color: #e41e3f;
    border: 1px solid #f5c6cb;
}

.auth-message.success {
    display: block;
    background: #e7f3e9;
    color: #42b72a;
    border: 1px solid #c3e6cb;
}

.info-text {
    margin-top: 16px;
    font-size: 12px;
    color: #65676b;
    text-align: center;
}

.swauth-footer {
    padding: 20px 32px;
    background: #f7f8fa;
    text-align: center;
    border-top: 1px solid #e4e6eb;
}

.swauth-footer p {
    margin: 0 0 8px;
    font-size: 12px;
    color: #65676b;
}

.small {
    font-size: 11px;
    opacity: 0.7;
}

/* Стили для авторизованного пользователя */
.user-info {
    text-align: center;
    margin-bottom: 24px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1877f2, #42b72a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    font-weight: bold;
    color: white;
}

/* Адаптивность */
@media (max-width: 480px) {
    .swauth-card {
        margin: 0;
    }

    .swauth-header {
        padding: 24px 20px;
    }

    .swauth-body {
        padding: 20px;
    }

    .swauth-footer {
        padding: 16px 20px;
    }
}